Project

General

Profile

Actions

Bug #14738

closed

Failed to load_from_binary on 2.5.1

Bug #14738: Failed to load_from_binary on 2.5.1

Added by znz (Kazuhiro NISHIYAMA) over 7 years ago. Updated almost 7 years ago.

Status:
Closed
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.

Updated by nobu (Nobuyoshi Nakada) over 7 years ago Actions #1

  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) over 7 years ago Actions #2 [ruby-core:86883]

"extra_data" is not necessary.

Updated by nagachika (Tomoyuki Chikanaga) almost 7 years ago Actions #3 [ruby-core:89795]

  • 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.

Actions

Also available in: PDF Atom