Actions
Bug #4001
closedRubyVM::InstructionSequence.compile can not take the 5th argument
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
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
Like0
Like0