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

* test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,

test/ruby/test_variable.rb: add some tests (for coverage of
  compile.c).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2010-01-22 14:53:12 +00:00
parent 1d674dc547
commit d8d5e67184
4 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Fri Jan 22 23:50:03 2010 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,
test/ruby/test_variable.rb: add some tests (for coverage of
compile.c).
Fri Jan 22 21:05:34 2010 Tanaka Akira <akr@fsij.org>
* time.c (time_mload): add submicro into vtm.subsecx. [ruby-dev:40133]

View file

@ -795,4 +795,9 @@ class TestRegexp < Test::Unit::TestCase
h = {a => 42}
assert_equal(42, h[b], '[ruby-core:24748]')
end
def test_regexp_poped
assert_nothing_raised { eval("a = 1; /\#{ a }/; a") }
assert_nothing_raised { eval("a = 1; /\#{ a }/o; a") }
end
end

View file

@ -132,4 +132,8 @@ class TestSymbol < Test::Unit::TestCase
assert_equal(:Foo, :foo.capitalize)
assert_equal(:fOo, :FoO.swapcase)
end
def test_symbol_poped
assert_nothing_raised { eval('a = 1; :"#{ a }"; 1') }
end
end

View file

@ -85,4 +85,8 @@ class TestVariable < Test::Unit::TestCase
def test_global_variable_poped
assert_nothing_raised { eval("$foo; 1") }
end
def test_constant_poped
assert_nothing_raised { eval("TestVariable::Gods; 1") }
end
end