From: Shugo Maeda Date: 2009-12-09T11:03:00+09:00 Subject: [ruby-core:27108] Re: [Bug #2376] Kernel.__method__ rubyspec failures for 1.8.* Hi Brian, 2009/12/9 Brian Ford : > My question is why do the existing specs pass in 1.9 (ie ruby 1.9.2dev (2009-10-30 trunk 25579) [i386-darwin9.8.0] and not in 1.8.7 (ie ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0]). > > Shouldn't the specs pass the same in both versions when using #send or #__send__? I guess Kernel#send doesn't push a frame in 1.9, but does in 1.8. defiant:ruby$ ruby-trunk -ve 'def foo; puts caller; end; send(:foo)' ruby 1.9.2dev (2009-12-05 trunk 26022) [i686-linux] -e:1:in `
' defiant:ruby$ ruby-1_8 -ve 'def foo; puts caller; end; send(:foo)' ruby 1.8.8dev (2009-12-05 revision 26022) [i686-linux] -e:1:in `send' -e:1 I'm not sure which behavior is reasonable, but it may be better to leave it implementation defined. FYI, IronRuby pushes a frame the same as 1.8, and Rubinius and JRuby doesn't. -- Shugo Maeda