Project

General

Profile

Actions

Bug #10959

closed

rb_iseq_load: problems with hash containing symbolic keys

Added by alvoskov (Alexey Voskov) about 9 years ago. Updated over 3 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.2.1p85 (2015-02-26 revision 49769) [x64-mingw32]
[ruby-core:<unknown>]
Tags:

Description

Hello!
I've found a bug in the rb_iseq_load function. When I'm trying to load the next code:

def func @basis << {:a => 1} end

compiled by RubyVM::InstructionSequence.compile_file(filename).to_a call it throws an exception "wrong argument type false (expected Symbol). If :a is replaced to "a" the precompiled code loads correctly. All files required for reproducing this bug is attached to the report.


Files

start.rb (453 Bytes) start.rb Launches tests using rb_iseq_load wrapper alvoskov (Alexey Voskov), 03/10/2015 03:33 PM
test2.rb (78 Bytes) test2.rb Working test alvoskov (Alexey Voskov), 03/10/2015 03:33 PM
test1.rb (61 Bytes) test1.rb Not working test alvoskov (Alexey Voskov), 03/10/2015 03:33 PM
test3.rb (72 Bytes) test3.rb Working test alvoskov (Alexey Voskov), 03/10/2015 03:33 PM
runner.c (295 Bytes) runner.c rb_iseq_load wrapper alvoskov (Alexey Voskov), 03/10/2015 03:33 PM
extconf.rb (111 Bytes) extconf.rb compiles rb_iseq_load_wrapper alvoskov (Alexey Voskov), 03/10/2015 03:33 PM

Updated by jeremyevans0 (Jeremy Evans) over 3 years ago

  • Status changed from Open to Closed

I get OK for all three test files uploaded. I tested Ruby 2.0, 2.2, and 2.7 and got the same result with each. So if this was a problem, it appears to have been fixed.

Actions

Also available in: Atom PDF

Like0
Like0