Project

General

Profile

Actions

Bug #10485

closed

NoMethodError "undefined method `initialize_copy'" when trying to execute Queue#dup

Added by bubo47 (Jakub Jursa) about 10 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-11-07 trunk 48313) [x86_64-linux]
[ruby-core:66128]

Description

Queue#dup raises NoMethodError (Queue#clone as well)

 :001 > q = Queue.new
 => #<Thread::Queue:0x00000001507ca0> 
 :002 > q.dup
NoMethodError: undefined method `initialize_copy' for #<Thread::Queue:0x00000001504c08>
	from (irb):2:in `initialize_dup'
	from (irb):2:in `dup'
	from (irb):2
	from /home/bubo/.rvm/rubies/ruby-head/bin/irb:11:in `<main>'

Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #9440: Calling methods on a `Queue.new.dup` or `Queue.new.clone` causes SegfaultClosed01/22/2014Actions
Related to Ruby master - Feature #8639: Add Queue#eachClosedko1 (Koichi Sasada)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0