MichaelBurge

Activity Graph

Page 1 of 1

2017-08-17

[02:11:58] MichaelBurge: Remote host closed the connection
[02:13:05] MichaelBurge: has joined #ruby
[03:27:08] MichaelBurge: Remote host closed the connection
[03:28:14] MichaelBurge: has joined #ruby

2017-08-16

[08:23:48] MichaelBurge: Remote host closed the connection
[08:24:55] MichaelBurge: has joined #ruby

2017-08-15

[13:46:33] MichaelBurge: Read error: Connection reset by peer
[13:47:39] MichaelBurge: has joined #ruby
[19:03:13] MichaelBurge: *.net *.split
[19:03:18] MichaelBurge: has joined #ruby

2017-08-14

[22:06:53] MichaelBurge: Remote host closed the connection
[22:08:00] MichaelBurge: has joined #ruby
[23:51:19] MichaelBurge: *.net *.split
[23:56:32] MichaelBurge: has joined #ruby

2017-08-13

[08:46:32] MichaelBurge: Remote host closed the connection
[14:31:20] MichaelBurge: has joined #ruby

2017-08-11

[01:07:49] MichaelBurge: has joined #ruby
[17:06:53] MichaelBurge: Remote host closed the connection
[17:07:59] MichaelBurge: has joined #ruby
[17:59:33] MichaelBurge: Remote host closed the connection
[18:00:39] MichaelBurge: has joined #ruby

2017-08-08

[02:29:35] MichaelBurge: Remote host closed the connection

2017-08-07

[05:35:18] MichaelBurge: has joined #ruby

2017-08-04

[07:57:42] MichaelBurge: Ping timeout: 258 seconds
[07:58:58] MichaelBurge: has joined #ruby
[08:51:37] MichaelBurge: Ping timeout: 246 seconds

2017-08-02

[23:52:14] MichaelBurge: has joined #ruby

2017-07-31

[02:15:11] MichaelBurge: Remote host closed the connection
[05:37:00] MichaelBurge: has joined #ruby
[05:37:46] MichaelBurge: has left #ruby: ()

2017-07-29

[17:35:24] MichaelBurge: has joined #ruby

2017-07-27

[01:59:43] MichaelBurge: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")

2017-07-26

[03:56:16] MichaelBurge: Remote host closed the connection
[03:57:23] MichaelBurge: has joined #ruby

2017-07-25

[17:51:13] MichaelBurge: has joined #ruby

2017-07-24

[23:53:23] MichaelBurge: Remote host closed the connection

2017-07-23

[18:13:58] MichaelBurge: has joined #ruby

2017-06-04

[09:46:05] MichaelBurge: has joined #ruby
[12:21:38] MichaelBurge: Remote host closed the connection
[12:22:46] MichaelBurge: has joined #ruby
[13:30:51] MichaelBurge: Remote host closed the connection
[23:41:11] MichaelBurge: has joined #ruby
[23:42:16] MichaelBurge: Remote host closed the connection

2017-05-20

[07:52:09] MichaelBurge: has joined #ruby
[08:58:58] MichaelBurge: Remote host closed the connection

2017-05-17

[06:46:56] MichaelBurge: Remote host closed the connection

2017-05-16

[20:12:51] MichaelBurge: has joined #ruby
[20:16:13] MichaelBurge: Hey all. I'm trying to add extra logging to my unit tests and am having a bit of trouble understanding the semantics of &block
[20:16:25] MichaelBurge: What are the differences in how these two blocks are called? https://hastebin.com/tofececaga.rb
[20:17:53] MichaelBurge: That's true, but when you wrap it inside of another do..end block it should be equivalent, right?
[20:19:48] MichaelBurge: I'm going to wrap it in an exception-catching block and print the exception
[20:20:18] MichaelBurge: They're not equivalent, because my fixtures aren't initialized in the first example but are in the second
[20:20:47] MichaelBurge: I did 'p block.arity' and it shows 0
[20:20:54] MichaelBurge: So there aren't any arguments
[20:21:10] MichaelBurge: The block in question are also my unit tests, so I know they aren't using the arguments
[20:23:21] MichaelBurge: That would be ActiveSupport::TestCase's test method. I'll go dig it up
[20:27:59] MichaelBurge: beweaver: Here it is: http://api.rubyonrails.org/classes/ActiveSupport/Testing/Declarative.html
[20:31:27] MichaelBurge: Are you suggesting that self gets rebound to the parent class rather than the module holding my unit tests, so that the instance variables are looked up on the parent class?
[20:32:32] MichaelBurge: Within the 'do' block, I can see that self is the child class, not the parent
[20:33:02] MichaelBurge: Okay. Is there a way to preserve the context when invoking it?
[20:35:23] MichaelBurge: self.instance_eval(&block) inside of the do..end seems to do the trick
[21:51:06] MichaelBurge: Remote host closed the connection
[21:52:14] MichaelBurge: has joined #ruby
[22:01:57] MichaelBurge: zenspider: self.instance_eval(&block) was enough to resolve the issue. The logging was because my exception objects had additional parameters that I wanted to see, but StandardError's inspect method only gives the message.
[22:02:15] MichaelBurge: I could've probably overridden inspect to get the information I needed, but I didn't realize it until after
[22:04:08] MichaelBurge: zenspider: The exception was unexpected, so I wouldn't need an assert.
[22:04:27] MichaelBurge: Though, maybe you meant for debugging that one test you could add the assert