Project

General

Profile

Actions

Bug #1322

closed

define_method scope bug

Added by coderrr (coderrr .) about 15 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]
[ruby-core:23050]

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

Actions #1

Updated by coderrr (coderrr .) about 15 years ago

=begin
Any reason there have been no responses to this?
=end

Actions #2

Updated by shyouhei (Shyouhei Urabe) about 15 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

Actions #3

Updated by nobu (Nobuyoshi Nakada) about 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r23257.
=end

Actions #4

Updated by shyouhei (Shyouhei Urabe) almost 15 years ago

  • Status changed from Closed to Open
  • Assignee changed from matz (Yukihiro Matsumoto) to shyouhei (Shyouhei Urabe)

=begin

=end

Actions #5

Updated by shyouhei (Shyouhei Urabe) almost 15 years ago

  • Assignee changed from shyouhei (Shyouhei Urabe) to wyhaines (Kirk Haines)
  • Priority changed from Normal to 5

=begin

=end

Actions #6

Updated by wyhaines (Kirk Haines) over 14 years ago

  • Status changed from Open to Assigned
  • % Done changed from 100 to 0

=begin

=end

Actions #7

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport186 to Ruby master
  • 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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0