ActionsLike0
Bug #1322
closeddefine_method scope bug
Description
=begin
a = 1
Object.send :define_method, :x do
lambda do
p a
a = 2
p a
end.call
end
x(nil)
p a
output is 1,2,1 instead of 1,2,2
details and possible fix: http://coderrr.wordpress.com/2009/03/29/ruby-18-define_method-scope-bug/
=end
Updated by coderrr (coderrr .) almost 16 years ago
=begin
Any reason there have been no responses to this?
=end
Updated by shyouhei (Shyouhei Urabe) almost 16 years ago
- Assignee set to matz (Yukihiro Matsumoto)
=begin
No, just beacuse no wan had time to look into your patch. Sorry. The situation is confirmed on my machine.
=end
Updated by nobu (Nobuyoshi Nakada) almost 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r23257.
=end
Updated by shyouhei (Shyouhei Urabe) almost 16 years ago
- Status changed from Closed to Open
- Assignee changed from matz (Yukihiro Matsumoto) to shyouhei (Shyouhei Urabe)
=begin
=end
Updated by shyouhei (Shyouhei Urabe) over 15 years ago
- Assignee changed from shyouhei (Shyouhei Urabe) to wyhaines (Kirk Haines)
- Priority changed from Normal to 5
=begin
=end
Updated by wyhaines (Kirk Haines) over 15 years ago
- Status changed from Open to Assigned
- % Done changed from 100 to 0
=begin
=end
Updated by jeremyevans0 (Jeremy Evans) over 5 years ago
- Tracker changed from Backport to Bug
- Project changed from 11 to Ruby
- Description updated (diff)
- Status changed from Assigned to Closed
- ruby -v set to ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]
- Backport set to 2.5: UNKNOWN, 2.6: UNKNOWN
ActionsLike0