diff options
author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-04 10:06:17 +0000 |
---|---|---|
committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-04 10:06:17 +0000 |
commit | c5f550c06918c7a0158f8f4e843b4a16dfb03c8a (patch) | |
tree | bb11a122fb28b83f64305c69ec10a3b986961216 /lib/irb/slex.rb | |
parent | d040c69a585f2a05385a81b5a3d34d80bc7118fa (diff) | |
download | ruby-c5f550c06918c7a0158f8f4e843b4a16dfb03c8a.tar.gz |
* lib/irb/{init.rb,ruby-lex.rb,slex.rb}: can't input '\c' for
[ruby-core: 7122]. and support for ruby1.8.X
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/slex.rb')
-rw-r--r-- | lib/irb/slex.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/irb/slex.rb b/lib/irb/slex.rb index 64321eb456..866bf30a5c 100644 --- a/lib/irb/slex.rb +++ b/lib/irb/slex.rb @@ -167,9 +167,9 @@ module IRB def match(chrs, op = "") D_DETAIL.print "match>: ", chrs, "op:", op, "\n" if chrs.empty? - if @preproc.nil? || @preproc.yield(op, chrs) + if @preproc.nil? || @preproc.call(op, chrs) DOUT.printf(D_DETAIL, "op1: %s\n", op) - @postproc.yield(op, chrs) + @postproc.call(op, chrs) else nil end @@ -180,9 +180,9 @@ module IRB return ret else chrs.unshift ch - if @postproc and @preproc.nil? || @preproc.yield(op, chrs) + if @postproc and @preproc.nil? || @preproc.call(op, chrs) DOUT.printf(D_DETAIL, "op2: %s\n", op.inspect) - ret = @postproc.yield(op, chrs) + ret = @postproc.call(op, chrs) return ret else return nil @@ -190,9 +190,9 @@ module IRB end else chrs.unshift ch - if @postproc and @preproc.nil? || @preproc.yield(op, chrs) + if @postproc and @preproc.nil? || @preproc.call(op, chrs) DOUT.printf(D_DETAIL, "op3: %s\n", op) - @postproc.yield(op, chrs) + @postproc.call(op, chrs) return "" else return nil @@ -211,9 +211,9 @@ module IRB ch = io.getc_of_rests end if ch.nil? - if @preproc.nil? || @preproc.yield(op, io) + if @preproc.nil? || @preproc.call(op, io) D_DETAIL.printf("op1: %s\n", op) - @postproc.yield(op, io) + @postproc.call(op, io) else nil end @@ -223,18 +223,18 @@ module IRB ret else io.ungetc ch - if @postproc and @preproc.nil? || @preproc.yield(op, io) + if @postproc and @preproc.nil? || @preproc.call(op, io) DOUT.exec_if{D_DETAIL.printf "op2: %s\n", op.inspect} - @postproc.yield(op, io) + @postproc.call(op, io) else nil end end else io.ungetc ch - if @postproc and @preproc.nil? || @preproc.yield(op, io) + if @postproc and @preproc.nil? || @preproc.call(op, io) D_DETAIL.printf("op3: %s\n", op) - @postproc.yield(op, io) + @postproc.call(op, io) else nil end |