Changeset 488 for trunk/samples/irb.rb

Show
Ignore:
Timestamp:
03/16/2008 22:17:12 (5 months ago)
Author:
why
Message:
  • shoes/ruby.c: set up $0.
  • lib/shoes.rb: with each loaded script, set $0 and FILE.
  • samples/irb.rb: set FILE and LINE.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/samples/irb.rb

    r374 r488  
    3333    end 
    3434    unless @line.empty? 
    35       obj = eval @line, TOPLEVEL_BINDING 
     35      obj = eval @line, TOPLEVEL_BINDING, "(irb)", @line_no 
    3636    end 
     37    @line_no += @line.scan(/\n/).length 
    3738    @line = '' 
    3839    @exp_line_no = @line_no