diff options
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 |