diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-12 02:48:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-12 02:48:28 +0000 |
commit | 150a954041b6db58d574052ab1f11b25aea9282e (patch) | |
tree | cf539c309beca91d4065fc5c546a3b9225595fc0 /ext | |
parent | 5e9e8e22b36efcf93f8166b4e367dff8c7ffa325 (diff) | |
download | ruby-150a954041b6db58d574052ab1f11b25aea9282e.tar.gz |
symbol/init.c: ID value
* ext/-test-/symbol/init.c (sym_pinneddown_p): return ID value or
nil for debugging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/symbol/init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/-test-/symbol/init.c b/ext/-test-/symbol/init.c index 9e42e1a38b..20cf2fa079 100644 --- a/ext/-test-/symbol/init.c +++ b/ext/-test-/symbol/init.c @@ -11,7 +11,13 @@ sym_find(VALUE dummy, VALUE sym) static VALUE sym_pinneddown_p(VALUE dummy, VALUE sym) { - return rb_check_id(&sym) ? Qtrue : Qfalse; + ID id = rb_check_id(&sym); + if (!id) return Qnil; +#ifdef ULL2NUM + return ULL2NUM(id); +#else + return ULONG2NUM(id); +#endif } void |