summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numeric.c2
-rw-r--r--version.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index e4bb4817bb..691ab77042 100644
--- a/numeric.c
+++ b/numeric.c
@@ -4529,6 +4529,7 @@ rb_fix_lshift(VALUE x, VALUE y)
long val, width;
val = NUM2LONG(x);
+ if (!val) return (rb_to_int(y), INT2FIX(0));
if (!FIXNUM_P(y))
return rb_big_lshift(rb_int2big(val), y);
width = FIX2LONG(y);
@@ -4575,6 +4576,7 @@ rb_fix_rshift(VALUE x, VALUE y)
long i, val;
val = FIX2LONG(x);
+ if (!val) return (rb_to_int(y), INT2FIX(0));
if (!FIXNUM_P(y))
return rb_big_rshift(rb_int2big(val), y);
i = FIX2LONG(y);
diff --git a/version.h b/version.h
index 5de5de5fc7..9ada821db3 100644
--- a/version.h
+++ b/version.h
@@ -12,7 +12,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 4
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 191
+#define RUBY_PATCHLEVEL 192
#define RUBY_RELEASE_YEAR 2022
#define RUBY_RELEASE_MONTH 3