[前][次][番号順一覧][スレッド一覧]

ruby-changes:22783

From: nobu <ko1@a...>
Date: Mon, 27 Feb 2012 17:27:48 +0900 (JST)
Subject: [ruby-changes:22783] nobu:r34832 (trunk): * test/ruby/test_syntax.rb (test_newline_in_block_parameters):

nobu	2012-02-27 17:27:39 +0900 (Mon, 27 Feb 2012)

  New Revision: 34832

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34832

  Log:
    * test/ruby/test_syntax.rb (test_newline_in_block_parameters):
      test for [ruby-dev:45292].

  Modified files:
    trunk/test/ruby/test_syntax.rb

Index: test/ruby/test_syntax.rb
===================================================================
--- test/ruby/test_syntax.rb	(revision 34831)
+++ test/ruby/test_syntax.rb	(revision 34832)
@@ -52,6 +52,16 @@
     f.close!
   end
 
+  def test_newline_in_block_parameters
+    bug = '[ruby-dev:45292]'
+    ["", "a", "a, b"].product(["", ";x", [";", "x"]]) do |params|
+      params = ["|", *params, "|"].join("\n")
+      assert_nothing_raised(SyntaxError, NameError, "#{bug} #{params.inspect}") do
+        eval("1.times{#{params}}")
+      end
+    end
+  end
+
   private
 
   def make_tmpsrc(f, src)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]