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

ruby-changes:47763

From: usa <ko1@a...>
Date: Thu, 14 Sep 2017 13:21:48 +0900 (JST)
Subject: [ruby-changes:47763] usa:r59881 (ruby_2_3): merge revision(s) 59644: [Backport #13836]

usa	2017-09-14 13:21:43 +0900 (Thu, 14 Sep 2017)

  New Revision: 59881

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59881

  Log:
    merge revision(s) 59644: [Backport #13836]
    
    parse.y: primary should not be 0
    
    * parse.y (primary): should not be 0, since it can be a receiver.
      [ruby-core:82447] [Bug #13836]

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/parse.y
    branches/ruby_2_3/test/ruby/test_defined.rb
    branches/ruby_2_3/version.h
Index: ruby_2_3/test/ruby/test_defined.rb
===================================================================
--- ruby_2_3/test/ruby/test_defined.rb	(revision 59880)
+++ ruby_2_3/test/ruby/test_defined.rb	(revision 59881)
@@ -99,6 +99,10 @@ class TestDefined < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_defined.rb#L99
     end
   end
 
+  def test_defined_empty_paren_arg
+    assert_nil(defined?(p () + 1))
+  end
+
   def test_defined_impl_specific
     feature7035 = '[ruby-core:47558]' # not spec
     assert_predicate(defined?(Foo), :frozen?, feature7035)
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 59880)
+++ ruby_2_3/version.h	(revision 59881)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.5"
 #define RUBY_RELEASE_DATE "2017-09-14"
-#define RUBY_PATCHLEVEL 371
+#define RUBY_PATCHLEVEL 372
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 9
Index: ruby_2_3/parse.y
===================================================================
--- ruby_2_3/parse.y	(revision 59880)
+++ ruby_2_3/parse.y	(revision 59881)
@@ -2701,7 +2701,7 @@ primary		: literal https://github.com/ruby/ruby/blob/trunk/ruby_2_3/parse.y#L2701
 		| tLPAREN_ARG {SET_LEX_STATE(EXPR_ENDARG);} rparen
 		    {
 		    /*%%%*/
-			$$ = 0;
+			$$ = NEW_BEGIN(0);
 		    /*%
 			$$ = dispatch1(paren, 0);
 		    %*/
Index: ruby_2_3
===================================================================
--- ruby_2_3	(revision 59880)
+++ ruby_2_3	(revision 59881)

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r59644

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

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