From 2bc293e899c9d32dcd794a73de8925c49ecf8f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 7 May 2021 10:04:08 +0900 Subject: cdhash_cmp: can take rational literals Rational literals are those integers suffixed with `r`. They tend to be a part of more complex expressions like `123/456r`, but in theory they can live alone. When such "bare" rational literals are passed to case-when branch, we have to take care of them. Fixes [Bug #17854] --- internal/rational.h | 1 + 1 file changed, 1 insertion(+) (limited to 'internal') diff --git a/internal/rational.h b/internal/rational.h index e53ee7b499..6bbd2a9810 100644 --- a/internal/rational.h +++ b/internal/rational.h @@ -33,6 +33,7 @@ VALUE rb_rational_div(VALUE self, VALUE other); VALUE rb_lcm(VALUE x, VALUE y); VALUE rb_rational_reciprocal(VALUE x); VALUE rb_cstr_to_rat(const char *, int); +VALUE rb_rational_hash(VALUE self); VALUE rb_rational_abs(VALUE self); VALUE rb_rational_cmp(VALUE self, VALUE other); VALUE rb_rational_pow(VALUE self, VALUE other); -- cgit v1.2.3