Project

General

Profile

Backport #1322

define_method scope bug

Added by coderrr (coderrr .) about 10 years ago. Updated about 8 years ago.

Status:
Assigned
Priority:
Normal
[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

Associated revisions

Revision 5f671527
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946). this version includes #1114, #1314, #1322, #1375, #1383, #1387
  • test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 52666
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946). this version includes #1114, #1314, #1322, #1375, #1383, #1387
  • test/rubygems: ditto.

Revision 52666
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946). this version includes #1114, #1314, #1322, #1375, #1383, #1387
  • test/rubygems: ditto.

Revision 52666
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946). this version includes #1114, #1314, #1322, #1375, #1383, #1387
  • test/rubygems: ditto.

Revision 52666
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946). this version includes #1114, #1314, #1322, #1375, #1383, #1387
  • test/rubygems: ditto.

Revision 52666
Added by hsbt (Hiroshi SHIBATA) over 3 years ago

  • lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946). this version includes #1114, #1314, #1322, #1375, #1383, #1387
  • test/rubygems: ditto.

History

#1

Updated by coderrr (coderrr .) about 10 years ago

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

#2

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

#3

Updated by nobu (Nobuyoshi Nakada) about 10 years ago

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

=begin
Applied in changeset r23257.
=end

#4

Updated by shyouhei (Shyouhei Urabe) about 10 years ago

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

=begin

=end

#5

Updated by shyouhei (Shyouhei Urabe) almost 10 years ago

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

=begin

=end

#6

Updated by wyhaines (Kirk Haines) over 9 years ago

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

=begin

=end

Also available in: Atom PDF