summaryrefslogtreecommitdiff
path: root/numeric.rb
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.rb')
-rw-r--r--numeric.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/numeric.rb b/numeric.rb
index 49e14bff49..e852c85bf9 100644
--- a/numeric.rb
+++ b/numeric.rb
@@ -296,28 +296,6 @@ class Integer
end
end
-# call-seq:
-# Integer.try_convert(object) -> object, integer, or nil
-#
-# If +object+ is an \Integer object, returns +object+.
-# Integer.try_convert(1) # => 1
-#
-# Otherwise if +object+ responds to <tt>:to_int</tt>,
-# calls <tt>object.to_int</tt> and returns the result.
-# Integer.try_convert(1.25) # => 1
-#
-# Returns +nil+ if +object+ does not respond to <tt>:to_int</tt>
-# Integer.try_convert([]) # => nil
-#
-# Raises an exception unless <tt>object.to_int</tt> returns an \Integer object.
-#
-def Integer.try_convert(num)
-=begin
- Primitive.attr! 'inline'
- Primitive.cexpr! 'rb_check_integer_type(num)'
-=end
-end if false
-
class Float
#
# call-seq: