Here's some code; can you tell what's wrong with it? I didn't spot the issue for quite a while. To boil it down a bit: class Foo attr_accessor :buz def initialize @buz = 42 end def bar unless buz buz = 21 end buz end end See the issue now? Another variant with no use of attr_accessor: class Foo def buz 42 end def bar unless buz buz = 21 end buz end end With this code, when I run p Foo.new.bar, I'd
I was upgrading a Rails 4.1 app from Ruby 2.2.3 to 2.3.1 and got an interesting error; from a debugger session: (byebug) rand(20.minutes) NoMethodError Exception: undefined method `begin' for 1200:Fixnum Ben Sullivan has a nice writeup of some oddities around Rails 4.1's ActiveSupport::Duration and how it uses BasicObject (and David Stostik talks about it more here), so I won't repeat that here. T
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く