зеркало из https://github.com/github/ruby.git
* 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:
Родитель
47084e129c
Коммит
6df4e18914
|
@ -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.
|
||||
|
||||
* main.c (always_gc): dllimport is required for VC to import a DLL
|
||||
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>
|
||||
|
||||
* 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;
|
||||
|
||||
case '>':
|
||||
if (*++m == '>') ++m;
|
||||
switch (*++m) {
|
||||
case '>': case '=': ++m; break;
|
||||
}
|
||||
break;
|
||||
|
||||
case '=':
|
||||
|
@ -8380,6 +8382,7 @@ rb_symname_p(const char *name)
|
|||
break;
|
||||
|
||||
case '|': case '^': case '&': case '/': case '%': case '~': case '`':
|
||||
++m;
|
||||
break;
|
||||
|
||||
case '[':
|
||||
|
|
|
@ -29,6 +29,33 @@ class TestSymbol < Test::Unit::TestCase
|
|||
assert_inspect_evaled(':foo')
|
||||
assert_inspect_evaled(':foo!')
|
||||
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
|
||||
|
||||
def test_inspect_dollar
|
||||
|
|
Загрузка…
Ссылка в новой задаче