mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (rb_symname_p): fixed wrong validation. [ruby-dev:28047]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
47084e129c
commit
6df4e18914
3 changed files with 34 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
||||||
Mon Dec 19 23:30:59 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Dec 19 23:32:39 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* Makefile.in (XCFLAGS): separated as well as win32/Makefile.sub.
|
* Makefile.in (XCFLAGS): separated as well as win32/Makefile.sub.
|
||||||
|
|
||||||
* main.c (always_gc): dllimport is required for VC to import a DLL
|
* main.c (always_gc): dllimport is required for VC to import a DLL
|
||||||
symbol. fixed: [ruby-dev:28051]
|
symbol. fixed: [ruby-dev:28051]
|
||||||
|
|
||||||
|
* parse.y (rb_symname_p): fixed wrong validation. [ruby-dev:28047]
|
||||||
|
|
||||||
Mon Dec 19 23:09:24 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
Mon Dec 19 23:09:24 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
* st.c: uses malloc instead of xmalloc to avoid GC. syck uses st_insert
|
* st.c: uses malloc instead of xmalloc to avoid GC. syck uses st_insert
|
||||||
|
|
5
parse.y
5
parse.y
|
@ -8360,7 +8360,9 @@ rb_symname_p(const char *name)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '>':
|
case '>':
|
||||||
if (*++m == '>') ++m;
|
switch (*++m) {
|
||||||
|
case '>': case '=': ++m; break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '=':
|
case '=':
|
||||||
|
@ -8380,6 +8382,7 @@ rb_symname_p(const char *name)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '|': case '^': case '&': case '/': case '%': case '~': case '`':
|
case '|': case '^': case '&': case '/': case '%': case '~': case '`':
|
||||||
|
++m;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '[':
|
case '[':
|
||||||
|
|
|
@ -29,6 +29,33 @@ class TestSymbol < Test::Unit::TestCase
|
||||||
assert_inspect_evaled(':foo')
|
assert_inspect_evaled(':foo')
|
||||||
assert_inspect_evaled(':foo!')
|
assert_inspect_evaled(':foo!')
|
||||||
assert_inspect_evaled(':bar?')
|
assert_inspect_evaled(':bar?')
|
||||||
|
assert_inspect_evaled(':<<')
|
||||||
|
assert_inspect_evaled(':>>')
|
||||||
|
assert_inspect_evaled(':<=')
|
||||||
|
assert_inspect_evaled(':>=')
|
||||||
|
assert_inspect_evaled(':=~')
|
||||||
|
assert_inspect_evaled(':==')
|
||||||
|
assert_inspect_evaled(':===')
|
||||||
|
assert_raise(SyntaxError) {eval ':='}
|
||||||
|
assert_inspect_evaled(':*')
|
||||||
|
assert_inspect_evaled(':**')
|
||||||
|
assert_raise(SyntaxError) {eval ':***'}
|
||||||
|
assert_inspect_evaled(':+')
|
||||||
|
assert_inspect_evaled(':-')
|
||||||
|
assert_inspect_evaled(':+@')
|
||||||
|
assert_inspect_evaled(':-@')
|
||||||
|
assert_inspect_evaled(':|')
|
||||||
|
assert_inspect_evaled(':^')
|
||||||
|
assert_inspect_evaled(':&')
|
||||||
|
assert_inspect_evaled(':/')
|
||||||
|
assert_inspect_evaled(':%')
|
||||||
|
assert_inspect_evaled(':~')
|
||||||
|
assert_inspect_evaled(':`')
|
||||||
|
assert_inspect_evaled(':[]')
|
||||||
|
assert_inspect_evaled(':[]=')
|
||||||
|
assert_raise(SyntaxError) {eval ':||'}
|
||||||
|
assert_raise(SyntaxError) {eval ':&&'}
|
||||||
|
assert_raise(SyntaxError) {eval ':['}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_inspect_dollar
|
def test_inspect_dollar
|
||||||
|
|
Loading…
Reference in a new issue