ruby-changes:56594
From: Nobuyoshi <ko1@a...>
Date: Fri, 19 Jul 2019 07:50:57 +0900 (JST)
Subject: [ruby-changes:56594] Nobuyoshi Nakada: 18bce998dd (master): Fixed build error with RIPPER_DEBUG
https://git.ruby-lang.org/ruby.git/commit/?id=18bce998dd From 18bce998ddbcf1266d53071a5d46a9e71950f0ea Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 19 Jul 2019 07:48:30 +0900 Subject: Fixed build error with RIPPER_DEBUG diff --git a/parse.y b/parse.y index e6deefc..d778a16 100644 --- a/parse.y +++ b/parse.y @@ -12479,8 +12479,6 @@ rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr) https://github.com/ruby/ruby/blob/trunk/parse.y#L12479 #ifdef RIPPER #ifdef RIPPER_DEBUG -extern int rb_is_pointer_to_heap(VALUE); - /* :nodoc: */ static VALUE ripper_validate_object(VALUE self, VALUE x) @@ -12492,8 +12490,6 @@ ripper_validate_object(VALUE self, VALUE x) https://github.com/ruby/ruby/blob/trunk/parse.y#L12490 rb_raise(rb_eArgError, "Qundef given"); if (FIXNUM_P(x)) return x; if (SYMBOL_P(x)) return x; - if (!rb_is_pointer_to_heap(x)) - rb_raise(rb_eArgError, "invalid pointer: %p", x); switch (BUILTIN_TYPE(x)) { case T_STRING: case T_OBJECT: @@ -12504,13 +12500,13 @@ ripper_validate_object(VALUE self, VALUE x) https://github.com/ruby/ruby/blob/trunk/parse.y#L12500 case T_RATIONAL: return x; case T_NODE: - if (nd_type(x) != NODE_RIPPER) { - rb_raise(rb_eArgError, "NODE given: %p", x); + if (nd_type((NODE *)x) != NODE_RIPPER) { + rb_raise(rb_eArgError, "NODE given: %p", (void *)x); } return ((NODE *)x)->nd_rval; default: rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", - x, rb_obj_classname(x)); + (void *)x, rb_obj_classname(x)); } return x; } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/