1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
* compile.c (defined_expr), insns.def (defined): share single frozen
  strings.  [EXPERIMENTAL] [ruby-core:47558][Feature #7035]
* iseq.c (rb_iseq_defined_string): make expression strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-09-24 08:36:53 +00:00
parent 8ac52a95d5
commit 2314b80d4c
8 changed files with 100 additions and 29 deletions

View file

@ -86,6 +86,12 @@ class TestDefined < Test::Unit::TestCase
assert_equal nil, defined?($2)
end
def test_defined_impl_specific
feature7035 = '[ruby-core:47558]' # not spec
assert_operator(defined?(Foo), :frozen?, feature7035)
assert_same(defined?(Foo), defined?(Array), feature7035)
end
class TestAutoloadedSuperclass
autoload :A, "a"
end