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

* test/ruby/test_parse.rb: remove tests for open_args.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-06-29 16:53:49 +00:00
parent 2950c7a919
commit 7fef733b9d
2 changed files with 4 additions and 48 deletions

View file

@ -1,3 +1,7 @@
Mon Jun 30 01:52:05 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_parse.rb: remove tests for open_args.
Sun Jun 29 23:01:54 2008 Tanaka Akira <akr@fsij.org>
* string.c (rb_str_format_m): make tmp volatile to avoid possible GC

View file

@ -122,45 +122,10 @@ class TestParse < Test::Unit::TestCase
@baz = r + (block_given? ? [yield] : [])
end
assert_nothing_raised do
t.instance_eval "baz ()"
end
assert_equal([], t.instance_eval { @baz })
assert_nothing_raised do
t.instance_eval "baz (1), 2"
end
assert_equal([1, 2], t.instance_eval { @baz })
assert_nothing_raised do
t.instance_eval "baz (3, 4)"
end
assert_equal([3, 4], t.instance_eval { @baz })
assert_nothing_raised do
t.instance_eval "baz (5, &proc{6})"
end
assert_equal([5, 6], t.instance_eval { @baz })
assert_nothing_raised do
t.instance_eval "baz (7 => 8)"
end
assert_equal([{ 7 => 8 }], t.instance_eval { @baz })
assert_nothing_raised do
t.instance_eval "baz (9, 10 => 11)"
end
assert_equal([9, { 10 => 11 }], t.instance_eval { @baz })
assert_nothing_raised do
t.instance_eval "baz (12, 13, 14 => 15)"
end
assert_equal([12, 13, { 14 => 15 }], t.instance_eval { @baz })
assert_nothing_raised do
t.instance_eval "baz (&proc {16})"
end
assert_equal([16], t.instance_eval { @baz })
end
def test_mlhs_node
@ -288,19 +253,6 @@ class TestParse < Test::Unit::TestCase
assert_equal(-4.0, a)
end
def test_open_args
o = Object.new
def o.foo(*r); r.inject(42, :+); end
a = nil
assert_nothing_raised do
o.instance_eval <<-END
a = foo ()
END
end
assert_equal(42, a)
end
def test_block_variable
o = Object.new
def o.foo(*r); yield(*r); end