mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merge revision(s) 35644:
* parse.y (f_arglist): should reset lexical states after empty argument list with no parenthesis as well as parenthesized list, so that reserved name method definition work. [ruby-dev:45626] [Bug #6403] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
915cbd051a
commit
046883d2ca
4 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri May 25 10:36:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (f_arglist): should reset lexical states after empty
|
||||
argument list with no parenthesis as well as parenthesized list,
|
||||
so that reserved name method definition work. [ruby-dev:45626]
|
||||
[Bug #6403]
|
||||
|
||||
Mon May 21 16:24:40 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/syslog/syslog.c (mSyslog_inspect): Use rb_sprintf().
|
||||
|
|
2
parse.y
2
parse.y
|
@ -4374,6 +4374,8 @@ f_arglist : '(' f_args rparen
|
|||
| f_args term
|
||||
{
|
||||
$$ = $1;
|
||||
lex_state = EXPR_BEG;
|
||||
command_start = TRUE;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
@ -52,6 +52,11 @@ class TestSyntax < Test::Unit::TestCase
|
|||
f.close!
|
||||
end
|
||||
|
||||
def test_reserved_method_no_args
|
||||
bug6403 = '[ruby-dev:45626]'
|
||||
assert_valid_syntax("def self; :foo; end", __FILE__, bug6403)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def make_tmpsrc(f, src)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#define RUBY_VERSION "1.9.3"
|
||||
#define RUBY_PATCHLEVEL 226
|
||||
#define RUBY_PATCHLEVEL 227
|
||||
|
||||
#define RUBY_RELEASE_DATE "2012-05-21"
|
||||
#define RUBY_RELEASE_DATE "2012-05-25"
|
||||
#define RUBY_RELEASE_YEAR 2012
|
||||
#define RUBY_RELEASE_MONTH 5
|
||||
#define RUBY_RELEASE_DAY 21
|
||||
#define RUBY_RELEASE_DAY 25
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue