ruby-changes:26676
From: nobu <ko1@a...>
Date: Mon, 7 Jan 2013 16:50:37 +0900 (JST)
Subject: [ruby-changes:26676] nobu:r38727 (trunk): test_syntax.rb: assert_not_label
nobu 2013-01-07 16:50:27 +0900 (Mon, 07 Jan 2013) New Revision: 38727 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38727 Log: test_syntax.rb: assert_not_label * test/ruby/test_syntax.rb (TestSyntax#assert_not_label): need to eval in the current binding. Modified files: trunk/test/ruby/test_syntax.rb Index: test/ruby/test_syntax.rb =================================================================== --- test/ruby/test_syntax.rb (revision 38726) +++ test/ruby/test_syntax.rb (revision 38727) @@ -330,7 +330,7 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L330 def not_label(x) @result = x; @not_label ||= nil end def assert_not_label(expected, src, message = nil) @result = nil - assert_valid_syntax(src, message) + assert_nothing_raised(SyntaxError, message) {eval(src)} assert_equal(expected, @result, message) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/