Permalink
Browse files

Merge pull request #6361 from markmcspadden/issue_6265

Remove special cases for duplicable? on Class and Module
  • Loading branch information...
2 parents 313f292 + 2f06d58 commit 6950d74e18750434dbf76fd6749a7c8f393f53be @josevalim josevalim committed May 17, 2012
@@ -81,30 +81,6 @@ def duplicable?
end
end
-class Class
- # Classes are not duplicable:
- #
- # c = Class.new # => #<Class:0x10328fd80>
- # c.dup # => #<Class:0x10328fd80>
- #
- # Note +dup+ returned the same class object.
- def duplicable?
- false
- end
-end
-
-class Module
- # Modules are not duplicable:
- #
- # m = Module.new # => #<Module:0x10328b6e0>
- # m.dup # => #<Module:0x10328b6e0>
- #
- # Note +dup+ returned the same module object.
- def duplicable?
- false
- end
-end
-
require 'bigdecimal'
class BigDecimal
begin
@@ -5,8 +5,8 @@
class DuplicableTest < ActiveSupport::TestCase
RAISE_DUP = [nil, false, true, :symbol, 1, 2.3, 5.seconds]
- YES = ['1', Object.new, /foo/, [], {}, Time.now]
- NO = [Class.new, Module.new]
+ YES = ['1', Object.new, /foo/, [], {}, Time.now, Class.new, Module.new]
+ NO = []
begin
bd = BigDecimal.new('4.56')

0 comments on commit 6950d74

Please sign in to comment.