From 0eab2b464e6861da0cc55f6dc1c7561e6628c74e Mon Sep 17 00:00:00 2001
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Fri, 2 Aug 2013 14:24:17 +0000
Subject: [PATCH] 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
---
 parse.y | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/parse.y b/parse.y
index b17d986738..e3c0caabfe 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) {