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 | 01134984ef51c4dfc7aebf4f3a371de9c8ddcce5 (patch) | |
tree | cf539c309beca91d4065fc5c546a3b9225595fc0 /ext/-test-/symbol | |
parent | 6d0f7c3c7d2476d99d57d988162c6cb897e243d3 (diff) | |
download | ruby-01134984ef51c4dfc7aebf4f3a371de9c8ddcce5.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/-test-/symbol')
-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 |