Project

General

Profile

ActionsLike0

Feature #2674

closed

RubyVM::InstructionSequence to accept IOs

Added by shyouhei (Shyouhei Urabe) about 15 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
[ruby-dev:40202]

Description

=begin
RipperはRipper#initializeでIOを受け付けますが、ISeqはそうはなっていません。
非対称なのでISeqもIOを受け付けるようにするのはどうでしょうか。

Signed-off-by: Urabe, Shyuohei

iseq.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/iseq.c b/iseq.c
index 3c957c7..2d86f5d 100644
--- a/iseq.c
+++ b/iseq.c
@@ -538,10 +538,14 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE line, VALUE opt)
rb_compile_option_t option;
const char *fn = StringValueCStr(file);
int ln = NUM2INT(line);

  • NODE *node = parse_string(StringValue(src), fn, ln);
  • NODE *node;
    rb_thread_t *th = GET_THREAD();
    make_compile_option(&option, opt);

  • if (rb_obj_respond_to(src, rb_intern("gets"), 0))

  •    node = rb_compile_file(fn, src, ln);
    
  • else

  •    node = rb_compile_string(fn, StringValue(src), ln);
    

    if (th->base_block && th->base_block->iseq) {
    return rb_iseq_new_with_opt(node, th->base_block->iseq->name,
    file, line, th->base_block->iseq->self,
    -- 1.6.0.4
    =end


Files

iseq_io.diff (748 Bytes) iseq_io.diff IOを受け付けるIseq Glass_saga (Masaki Matsushita), 07/01/2012 10:57 PM
ripper_with_T_FILE.diff (1.26 KB) ripper_with_T_FILE.diff T_FILEの方に倒したripper Glass_saga (Masaki Matsushita), 07/01/2012 10:57 PM
#1

Updated by shyouhei (Shyouhei Urabe) about 15 years ago

  • Category set to YARV
  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)
  • Target version set to 1.9.2
#2

Updated by naruse (Yui NARUSE) about 15 years ago

  • Priority changed from 3 to Normal
#9

Updated by znz (Kazuhiro NISHIYAMA) about 15 years ago

  • Start date set to 01/28/2010
#10

Updated by mame (Yusuke Endoh) almost 15 years ago

  • Target version changed from 1.9.2 to 2.0.0

Updated by ko1 (Koichi Sasada) almost 13 years ago

  • Description updated (diff)

Updated by mame (Yusuke Endoh) almost 13 years ago

  • Status changed from Assigned to Feedback

Updated by Glass_saga (Masaki Matsushita) almost 13 years ago

Updated by shyouhei (Shyouhei Urabe) over 12 years ago

  • Status changed from Feedback to Assigned

Updated by ko1 (Koichi Sasada) over 12 years ago

  • Assignee changed from ko1 (Koichi Sasada) to shyouhei (Shyouhei Urabe)

Updated by mame (Yusuke Endoh) over 12 years ago

  • Status changed from Assigned to Closed
ActionsLike0

Also available in: Atom PDF