warreng_

Activity Graph

Page 1 of 1

2018-03-28

[16:19:24] warreng_: has joined #RubyOnRails
[16:24:46] warreng_: ugh... upgrading an app from rails 4.0 to 5.1 and ran into a weird issue. in a model there's a "belongs_to :foo" as well as a "def foo(bar=nil); super; nil". worked okay in 4.0 but in 5.1 i'm getting "wrong number of arguments (given 1, expected 0)". any ideas?
[16:25:16] warreng_: if i change it to just "def foo; super; end" it works fine, but something weird is going on with super() and args being passed
[16:26:15] warreng_: maybe the behavior of "super" without args changed between Ruby 2.2 and 2.4?
[16:27:07] warreng_: yes, that's it!! "super()" works as expected
[18:38:45] warreng_: Quit: Page closed

2018-01-04

[02:54:35] warreng_: has joined #ruby
[02:54:58] warreng_: 14880 == Zlib::GzipReader.new(StringIO.new(File.read("/private/tmp/127135\ 3/127135_2018-01-03_0\#18.json.gz"))).read.length
[02:55:07] warreng_: 159706438 == `cat /private/tmp/127135\\ 3/127135_2018-01-03_0\#18.json.gz | gzip -d`.length
[02:55:32] warreng_: can anybody shed some light on why Zlib::GzipReader is only returning the first 9 lines of a gzipped file?
[02:57:49] warreng_: 14880 == f=File.open("/private/tmp/127135\ 3/127135_2018-01-03_0\#18.json.gz", "rb"); Zlib::GzipReader.new(f).read.length
[02:57:58] warreng_: (it's not StringIO)
[03:02:20] warreng_: has joined #RubyOnRails
[03:18:55] warreng_: Ping timeout: 260 seconds

2018-01-03

[21:09:02] warreng_: has joined #ruby
[21:12:25] warreng_: given that Net::HTTP supports returning chunks of a response at a time via response.read_body { |chunk| ... } and given that Zlib::GzipReader.new takes an IOStream and has a each_line method, how can i combine the two so that i can process one line of a gzip'd response at a time?
[21:13:29] warreng_: can i create an enumerator out of the response.read_body { |block| ... } somehow and pass that to Zlib::GzipReader ?
[21:41:10] warreng_: Ping timeout: 260 seconds

2016-05-21

[15:26:58] warreng_: Quit: Page closed

2016-05-19

[17:40:44] warreng_: has joined #ruby
[17:41:01] warreng_: Changing host
[17:41:02] warreng_: has joined #ruby
[17:41:18] warreng_: i don't understand this syntax, what's happening here: @rx_queue << (query, deferrable = @tx_queue.shift)
[17:41:41] warreng_: @rx_queue is an array that's getting something pushed... but query isn't defined, and how do the parans work?
[17:42:04] warreng_: ohhh.... query,deferable are two new variables getting set to what's coming off of @tx_queue

2015-07-17

[05:22:31] warreng_: has joined #ruby