From 979f006b9e63cc787551d98b9bea9e94d61744de Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 30 May 2003 16:08:03 +0000 Subject: * io.c (rb_f_syscall): type dispatch should be based on rb_check_string_type(), not FIXNUM_P(), because values may be a bignum. [ruby-talk:72257] * eval.c (rb_call0): should pass the current klass value to block_invoke, which may be called via "super". [ruby-core:01077] * eval.c (block_invoke): now takes 4th argument "klass". * eval.c (block_alloc): should propagate BLOCK_PROC to ruby_block. * marshal.c (r_object0): should not use "yield" method, use "call" instead. (ruby-bugs-ja PR#476) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/debug.rb | 16 ++++++++-------- lib/optparse.rb | 12 ++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/debug.rb b/lib/debug.rb index 1b558ab90f..0caeecb00c 100644 --- a/lib/debug.rb +++ b/lib/debug.rb @@ -781,8 +781,8 @@ class << DEBUGGER__ saved_crit = Thread.critical Thread.critical = true make_thread_list - for th in @thread_list - context(th[0]).set_trace arg + for th, in @thread_list + context(th).set_trace arg end Thread.critical = saved_crit arg @@ -796,9 +796,9 @@ class << DEBUGGER__ saved_crit = Thread.critical Thread.critical = true make_thread_list - for th in @thread_list - next if th[0] == Thread.current - context(th[0]).set_suspend + for th, in @thread_list + next if th == Thread.current + context(th).set_suspend end Thread.critical = saved_crit # Schedule other threads to suspend as soon as possible. @@ -809,9 +809,9 @@ class << DEBUGGER__ saved_crit = Thread.critical Thread.critical = true make_thread_list - for th in @thread_list - next if th[0] == Thread.current - context(th[0]).clear_suspend + for th, in @thread_list + next if th == Thread.current + context(th).clear_suspend end waiting.each do |th| th.run diff --git a/lib/optparse.rb b/lib/optparse.rb index de88b648ec..a5905d2d4b 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -414,7 +414,11 @@ summary feature. pat = t if t.respond_to?(:match) end unless block +<<<<<<< optparse.rb + block = pat.method(:convert).to_block if pat.respond_to?(:convert) +======= block = pat.method(:convert).to_block if pat.respond_to?(:convert) +>>>>>>> 1.19 end @atype[t] = [pat, block] end @@ -949,7 +953,11 @@ Default options, which never appear in option summary. # directly specified pattern(any object possible to match) if !(String === o) and o.respond_to?(:match) pattern = notwice(o, pattern, 'pattern') +<<<<<<< optparse.rb + conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert)) +======= conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert)) +>>>>>>> 1.19 next end @@ -962,7 +970,11 @@ Default options, which never appear in option summary. when CompletingHash when nil pattern = CompletingHash.new +<<<<<<< optparse.rb + conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert)) +======= conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert)) +>>>>>>> 1.19 else raise ArgumentError, "argument pattern given twice" end -- cgit v1.2.3