summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--parse.y2
-rw-r--r--test/ruby/test_syntax.rb8
-rw-r--r--version.h2
4 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 84b68eb..67e70e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Sep 14 13:32:39 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ parse.y: empty hash in defined
+
+ * parse.y (command): NODE_ARRAY with NULL is invalid. traversal
+ in defined_expr0 is simplified than iseq_compile_each0.
+ [ruby-core:82113] [Bug #13756]
+
Thu Sep 14 13:26:31 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
string.c: fix false coderange
diff --git a/parse.y b/parse.y
index aa8a743..8774014 100644
--- a/parse.y
+++ b/parse.y
@@ -2506,7 +2506,7 @@ call_args : command
| assocs opt_block_arg
{
/*%%%*/
- $$ = NEW_LIST($1 ? new_hash($1) : 0);
+ $$ = $1 ? NEW_LIST(new_hash($1)) : 0;
$$ = arg_blk_pass($$, $2);
/*%
$$ = arg_add_assocs(arg_new(), $1);
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 56ea659..29851b7 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -155,10 +155,16 @@ class TestSyntax < Test::Unit::TestCase
end
def test_keyword_empty_splat
- assert_separately([], <<-'end;')
+ assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}")
+ begin;
bug10719 = '[ruby-core:67446] [Bug #10719]'
assert_valid_syntax("foo(a: 1, **{})", bug10719)
end;
+ assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}")
+ begin;
+ bug13756 = '[ruby-core:82113] [Bug #13756]'
+ assert_valid_syntax("defined? foo(**{})", bug13756)
+ end;
end
def test_keyword_self_reference
diff --git a/version.h b/version.h
index c8ac13c..24cc9fe 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.3.5"
#define RUBY_RELEASE_DATE "2017-09-14"
-#define RUBY_PATCHLEVEL 374
+#define RUBY_PATCHLEVEL 375
#define RUBY_RELEASE_YEAR 2017
#define RUBY_RELEASE_MONTH 9