diff options
-rw-r--r-- | class.c | 2 | ||||
-rw-r--r-- | test/ruby/test_object.rb | 13 |
2 files changed, 14 insertions, 1 deletions
@@ -2148,7 +2148,7 @@ rb_freeze_singleton_class(VALUE x) /* should not propagate to meta-meta-class, and so on */ if (!(RBASIC(x)->flags & FL_SINGLETON)) { VALUE klass = RBASIC_CLASS(x); - if (klass && (klass = RCLASS_ORIGIN(klass)) != 0 && FL_TEST(klass, (FL_SINGLETON|FL_FREEZE)) == FL_SINGLETON) { OBJ_FREEZE_RAW(klass); } @@ -925,6 +925,19 @@ class TestObject < Test::Unit::TestCase end end def test_redef_method_missing bug5473 = '[ruby-core:40287]' ['ArgumentError.new("bug5473")', 'ArgumentError, "bug5473"', '"bug5473"'].each do |code| |