summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_namespace.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_namespace.rb b/test/ruby/test_namespace.rb
index af0d6173f2..2b7dd04ac7 100644
--- a/test/ruby/test_namespace.rb
+++ b/test/ruby/test_namespace.rb
@@ -715,6 +715,7 @@ class TestNamespace < Test::Unit::TestCase
def self.yield_block = yield
def self.call_block(&b) = b.call
end
+ FOO_NAME = Foo.name
NS9 = Foo.new.ns4
EOC
ns.eval(code)
@@ -731,6 +732,9 @@ class TestNamespace < Test::Unit::TestCase
assert_equal outer, ns::Foo.yield_block{ Namespace.current } # method yields
assert_equal outer, ns::Foo.call_block{ Namespace.current } # method calls a block
assert_equal ns, ns::NS9 # on TOP frame, referring a class in the current
+
+ assert_equal "Foo", ns::FOO_NAME
+ assert_equal "Foo", ns::Foo.name
end;
end