From 196c24620e95e1c0412732cf14f1ccb441cf224f Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Tue, 12 Dec 2023 13:40:05 -0500 Subject: [PRISM] Correctly parse non-base 10 integers in Prism This commit passes an `end` to rb_int_parse_cstr which allows us to correctly parse non-base 10 integers which are enclosed in parenthesis. Prior to this commit, we were getting a putobject nil when compiling `(0o0)` for example. --- test/ruby/test_compile_prism.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 0409fc3e46..f5849afd83 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -34,6 +34,7 @@ module Prism assert_prism_eval("0b10") assert_prism_eval("0o10") assert_prism_eval("010") + assert_prism_eval("(0o00)") end def test_NilNode -- cgit v1.2.3