W3cubDocs

/Ruby on Rails 5.2

class Rational

Parent:
Object

Public Instance Methods

duplicable?() Show source
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 152
def duplicable?
  false
end

Rationals are not duplicable:

Rational(1).duplicable? # => false
Rational(1).dup         # => TypeError: can't copy Rational

© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.