1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* iseq.c (rb_iseq_defined_string): the index of defined_strings must

be the value of type - 1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-09-24 23:17:59 +00:00
parent 418bbce88a
commit 2eadff346a
3 changed files with 12 additions and 2 deletions

View file

@ -84,6 +84,11 @@ class TestDefined < Test::Unit::TestCase
assert_equal 'global-variable', defined?($+)
assert_equal 'global-variable', defined?($1)
assert_equal nil, defined?($2)
assert_equal("nil", defined?(nil))
assert_equal("true", defined?(true))
assert_equal("false", defined?(false))
assert_equal("expression", defined?(1))
end
def test_defined_impl_specific