srenatus

Activity Graph

Page 1 of 1

2016-02-19

[07:02:33] srenatus: has joined #ruby
[07:48:17] srenatus: has left #ruby: ()

2016-02-18

[07:41:32] srenatus: has joined #ruby
[19:36:08] srenatus: Quit: Connection closed for inactivity

2016-02-17

[07:02:19] srenatus: has joined #ruby

2016-02-16

[07:01:56] srenatus: has joined #ruby
[21:56:08] srenatus: Quit: Connection closed for inactivity

2016-02-15

[07:06:27] srenatus: has joined #ruby
[09:16:53] srenatus: has joined #ruby
[09:16:53] srenatus: Changing host
[21:06:07] srenatus: Quit: Connection closed for inactivity

2016-02-12

[08:20:36] srenatus: has joined #ruby
[20:46:07] srenatus: Quit: Connection closed for inactivity

2016-02-10

[07:49:58] srenatus: has joined #ruby
[19:16:06] srenatus: Quit: Connection closed for inactivity

2016-02-09

[09:26:48] srenatus: has joined #ruby
[20:46:06] srenatus: Quit: Connection closed for inactivity

2016-02-08

[07:37:28] srenatus: has joined #ruby
[19:06:06] srenatus: Quit: Connection closed for inactivity

2016-02-05

[07:15:23] srenatus: has joined #ruby
[21:56:05] srenatus: Quit: Connection closed for inactivity

2016-02-04

[11:17:43] srenatus: has joined #ruby
[20:47:47] srenatus: *.net *.split
[23:26:05] srenatus: Quit: Connection closed for inactivity

2016-02-03

[07:56:06] srenatus: has joined #ruby
[20:56:05] srenatus: Quit: Connection closed for inactivity

2016-01-29

[08:08:54] srenatus: has joined #ruby
[21:06:04] srenatus: Quit: Connection closed for inactivity

2016-01-28

[12:50:51] srenatus: has joined #ruby
[20:56:03] srenatus: Quit: Connection closed for inactivity

2016-01-27

[10:37:02] srenatus: has joined #ruby
[19:06:04] srenatus: Quit: Connection closed for inactivity

2016-01-25

[08:32:17] srenatus: has joined #ruby
[20:16:03] srenatus: Quit: Connection closed for inactivity

2016-01-22

[09:33:17] srenatus: has joined #ruby
[20:06:02] srenatus: Quit: Connection closed for inactivity

2016-01-20

[08:22:46] srenatus: has joined #ruby
[20:16:02] srenatus: Quit: Connection closed for inactivity

2016-01-19

[09:38:06] srenatus: has joined #ruby
[09:39:11] srenatus: hi there. how could I find the cause when an `instance_eval &block` is raising an exception? it's a failed conversion of fixnum to string, but I have no idea which line of code even tries to do that...
[09:39:43] srenatus: I was trying to use byebug to step through the code line-by-line, but it goes directly to the `rescue` block after the `instance_eval`
[09:43:29] srenatus: the call to instance_eval, basically
[09:43:36] srenatus: and what led up to it
[09:52:29] srenatus: Ox0dea: hmm, haven't prepared a MWE; can't post much: https://gist.github.com/srenatus/90e300d5a081c0d7068b
[09:55:41] srenatus: Ox0dea: I appreciate the long shot, but I am not :)
[09:58:36] srenatus: hehe Ox0dea just found that myself -- to my huge surprise
[09:59:00] srenatus: Ox0dea: so... I should not? ;)
[09:59:56] srenatus: Ox0dea: ok, I'll dig into that. thank you so much
[10:02:06] srenatus: Ox0dea: nah, no luck. :)
[10:12:04] srenatus: Ox0dea: I commented that line out ;) so, no more Regexp.quote except for in some specs
[10:56:32] srenatus: Ox0dea: turns out you can call `instance_eval` either with string, filename, line_no OR with a block. what is not possible (and leads to my error) is `instance_eval(filename, line_no) &block`
[10:57:23] srenatus: >> instance_eval("filename", 1) &Proc.new { puts "hi there" } rescue $!
[11:01:16] srenatus: Ox0dea: yup, which is great. there's just no way to give it any information where that block came from, right?
[11:01:23] srenatus: which is what I was trying to do...
[11:02:38] srenatus: Ox0dea: exactly, and when I pass that block to instance_eval, I could give it source and line_no information from that. or will it figure that out from Proc#source_location itself?
[11:03:37] srenatus: yup. ok, great.
[11:03:46] srenatus: Ox0dea: thanks for your help
[23:26:02] srenatus: Quit: Connection closed for inactivity

2014-10-30

[15:49:29] srenatus: hi there. is there any way to IO.read (basically) from a File::Stat object?
[15:51:22] srenatus: workmad3: I want to ensure that the file I read is the file that I checked before, so nothing can exchange the file between the line that checks if it's ok and the line that reads the file
[15:51:54] srenatus: workmad3: in other words TOCTOU
[15:53:03] srenatus: jhass: thanks
[15:56:43] srenatus: jhass: IO.open takes an FD, did you mean File.open ?
[15:57:10] srenatus: hmm IO.open("/tmp/foo") fails for me, File.open works
[16:00:26] srenatus: File.open does the trick for me. thanks