1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Mark Class as not being duplicable. [#829 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
Frederick Cheung 2008-08-21 18:23:18 +01:00 committed by Pratik Naik
parent bbedb6a624
commit 654c41255d
2 changed files with 7 additions and 1 deletions

View file

@ -35,3 +35,9 @@ class Numeric #:nodoc:
false
end
end
class Class #:nodoc:
def duplicable?
false
end
end

View file

@ -1,7 +1,7 @@
require 'abstract_unit'
class DuplicableTest < Test::Unit::TestCase
NO = [nil, false, true, :symbol, 1, 2.3, BigDecimal.new('4.56')]
NO = [nil, false, true, :symbol, 1, 2.3, BigDecimal.new('4.56'), Class.new]
YES = ['1', Object.new, /foo/, [], {}, Time.now]
def test_duplicable