parse.y: ripper for new literals
* parse.y (ripper_validate_object): ripper support for new literals, tRATIONAL and tIMAGINARY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2f57e80640
commit
0eab2b464e
4
parse.y
4
parse.y
@ -11040,12 +11040,14 @@ ripper_validate_object(VALUE self, VALUE x)
|
|||||||
if (SYMBOL_P(x)) return x;
|
if (SYMBOL_P(x)) return x;
|
||||||
if (!rb_is_pointer_to_heap(x))
|
if (!rb_is_pointer_to_heap(x))
|
||||||
rb_raise(rb_eArgError, "invalid pointer: %p", x);
|
rb_raise(rb_eArgError, "invalid pointer: %p", x);
|
||||||
switch (TYPE(x)) {
|
switch (BUILTIN_TYPE(x)) {
|
||||||
case T_STRING:
|
case T_STRING:
|
||||||
case T_OBJECT:
|
case T_OBJECT:
|
||||||
case T_ARRAY:
|
case T_ARRAY:
|
||||||
case T_BIGNUM:
|
case T_BIGNUM:
|
||||||
case T_FLOAT:
|
case T_FLOAT:
|
||||||
|
case T_COMPLEX:
|
||||||
|
case T_RATIONAL:
|
||||||
return x;
|
return x;
|
||||||
case T_NODE:
|
case T_NODE:
|
||||||
if (nd_type(x) != NODE_LASGN) {
|
if (nd_type(x) != NODE_LASGN) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user