Project

General

Profile

Actions

Bug #4001

closed

RubyVM::InstructionSequence.compile can not take the 5th argument

Added by yhara (Yutaka HARA) over 13 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
1.9.2p0
Backport:
[ruby-core:32953]

Description

=begin
InstructionSequence.compile takes src, file, path, line, opt
as the arguments, but raises ArgumentError when opt is given.

Example:

$ ruby -e 'p RubyVM::InstructionSequence.compile("", "", "", 1, {})'
-e:1:in `compile': wrong number of arguments (5 for 1..4) (ArgumentError)

Patch:

Index: iseq.c

--- iseq.c (revision 29626)
+++ iseq.c (working copy)
@@ -581,7 +581,7 @@

  rb_secure(1);
  • rb_scan_args(argc, argv, "13", &src, &file, &path, &line, &opt);
  • rb_scan_args(argc, argv, "14", &src, &file, &path, &line, &opt);
    if (NIL_P(file)) file = rb_str_new2("");
    if (NIL_P(line)) line = INT2FIX(1);
    =end
Actions #1

Updated by ko1 (Koichi Sasada) over 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29630.
Yutaka, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0