summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-02 14:24:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-02 14:24:17 +0000
commit0eab2b464e6861da0cc55f6dc1c7561e6628c74e (patch)
treed4e1bb0e64d2331acf3ca7c9fa9ad23ad3e03bbb
parent2f57e8064003233b676dfe13dfaaba90288be946 (diff)
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
-rw-r--r--parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index b17d986..e3c0caa 100644
--- a/parse.y
+++ b/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) {