[#8484] strptime fails to properly parse certain inputs — <noreply@...>

Bugs item #5263, was opened at 2006-08-01 23:14

13 messages 2006/08/02
[#8485] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — Yukihiro Matsumoto <matz@...> 2006/08/02

Hi,

[#8538] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — nobu@... 2006/08/06

Hi,

[#8561] sandbox timers & block scopes — why the lucky stiff <ruby-core@...>

Two puzzles I am trying to solve:

28 messages 2006/08/08
[#8624] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

raise ThisDecayingInquisition, "anyone? anyone at all?"

[#8627] Re: sandbox timers & block scopes — MenTaLguY <mental@...> 2006/08/15

On Wed, 2006-08-16 at 00:35 +0900, why the lucky stiff wrote:

[#8628] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

On Wed, Aug 16, 2006 at 02:46:30AM +0900, MenTaLguY wrote:

[#8629] Re: sandbox timers & block scopes — "Charles O Nutter" <headius@...> 2006/08/15

On 8/15/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:

[#8690] a ruby-core primer — why the lucky stiff <ruby-core@...>

Hello, all. I've been working on the ruby-core page for the new Ruby site.

21 messages 2006/08/22

bug? continuation called across trap

From: Young Hyun <youngh@...>
Date: 2006-08-28 17:43:48 UTC
List: ruby-core #8743
I posted this on ruby-talk but didn't get any replies.  Hopefully  
someone on ruby-core can help.

Does anyone know what the rather mysterious error "continuation  
called across trap" means?  It's triggered when I use SyncEnumerator  
in a multithreaded script.  I don't believe I'm doing anything  
obviously wrong with threads, but this error disappears if I don't  
use threads.  Furthermore, the error seems to occur when I use irb  
but not ruby (?? I need to verify this).  I'm suspecting there might  
be a bug in irb.  Code to reproduce the problem is below.  Note,  
also, that the problem disappears if you remove the use of  
@values.find--that is, if you call SyncEnumerator.each directly in  
the lambda.

  --Young

=============================================
require 'thread'
require 'generator'

class Region

   def initialize
     @values = []
     @work_queue = Queue.new
     @thread = Thread.new do
       loop do
	@work_queue.deq.call
       end
     end
   end

   def add(value)
     @work_queue << lambda do
       @values << value
     end
   end

   def find(template)
     @work_queue << lambda do
       @values.find do |value|
	SyncEnumerator.new(template, value).each do |lhs, rhs|
	  puts "checking: #{lhs.inspect} === #{rhs.inspect}"
	end
       end
     end
   end

end

Thread.abort_on_exception = true

reg = Region.new
reg.add [1,1]
reg.add [1,2]
reg.add [1,3]

reg.find [1,2]

#sleep 10  # uncommenting this somehow prevents the error

=============================================
MacOS X 10.4.7
$ ruby --version
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.5.0]
$ irb --prompt-mode simple
 >> load 'Fail4.rb'
checking: 1 === 1=> true
 >>
/opt/local/lib/ruby/1.8/generator.rb:132:in `call': continuation  
called across trap (RuntimeError)
         from /opt/local/lib/ruby/1.8/generator.rb:132:in `next'
         from /opt/local/lib/ruby/1.8/generator.rb:225:in `each'
         from /opt/local/lib/ruby/1.8/generator.rb:220:in `each'
         from /opt/local/lib/ruby/1.8/generator.rb:217:in `each'
         from ./Fail4.rb:25:in `find'
         from ./Fail4.rb:2:in `find'
         from ./Fail4.rb:24:in `find'
         from ./Fail4.rb:11:in `initialize'
         from ./Fail4.rb:10:in `initialize'
         from ./Fail4.rb:9:in `initialize'
         from ./Fail4.rb:36
         from (irb):1:in `irb_binding'
         from /opt/local/lib/ruby/1.8/irb/workspace.rb:52:in  
`irb_binding'
         from /opt/local/lib/ruby/1.8/irb/workspace.rb:52


In This Thread

Prev Next