Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove special cases for duplicable? on Class and Module

  • Loading branch information...
commit 2f06d5842b4c5969c2013d25bea4078563a02b13 1 parent 47971a1
Mark McSpadden markmcspadden authored
24 activesupport/lib/active_support/core_ext/object/duplicable.rb
View
@@ -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
4 activesupport/test/core_ext/duplicable_test.rb
View
@@ -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')
Please sign in to comment.
Something went wrong with that request. Please try again.