mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 3 additions and 1 deletions
4
parse.y
4
parse.y
|
@ -11040,12 +11040,14 @@ ripper_validate_object(VALUE self, VALUE x)
|
|||
if (SYMBOL_P(x)) return x;
|
||||
if (!rb_is_pointer_to_heap(x))
|
||||
rb_raise(rb_eArgError, "invalid pointer: %p", x);
|
||||
switch (TYPE(x)) {
|
||||
switch (BUILTIN_TYPE(x)) {
|
||||
case T_STRING:
|
||||
case T_OBJECT:
|
||||
case T_ARRAY:
|
||||
case T_BIGNUM:
|
||||
case T_FLOAT:
|
||||
case T_COMPLEX:
|
||||
case T_RATIONAL:
|
||||
return x;
|
||||
case T_NODE:
|
||||
if (nd_type(x) != NODE_LASGN) {
|
||||
|
|
Loading…
Add table
Reference in a new issue