Project

General

Profile

Bug #14738

Failed to load_from_binary on 2.5.1

Added by znz (Kazuhiro NISHIYAMA) about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
[ruby-core:86877]

Description

%  cat /tmp/1226.rb
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
p RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
%  ruby -v /tmp/1226.rb
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
<compiled>:1: warning: assigned but unused variable - num
Traceback (most recent call last):
    1: from /tmp/1226.rb:3:in `<main>'
/tmp/1226.rb:3:in `load_from_binary': wrong argument type nil (expected String) (TypeError)

rubyfarm-bisect says first bad commit is r58979.
It seems trunk is aleady fixed.

#1

Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) about 2 years ago

"extra_data" is not necessary.

Updated by nagachika (Tomoyuki Chikanaga) over 1 year ago

  • Backport changed from 2.3: DONTNEED, 2.4: DONTNEED, 2.5: REQUIRED to 2.3: DONTNEED, 2.4: DONTNEED, 2.5: DONE

ruby_2_5 r65728 merged revision(s) 62772.

Also available in: Atom PDF