[ruby-core:89306] [Ruby trunk Bug#15211] Integer.try_convert

From: hanmac@...
Date: 2018-10-07 09:23:33 UTC
List: ruby-core #89306
Issue #15211 has been updated by Hanmac (Hans Mackowiak).


I don't know about the other try_convert

how does Ruby react if you try to overwrite the try_convert from the ruby side?

i suspect that currently it doesn't care, should that be changed?

----------------------------------------
Bug #15211: Integer.try_convert
https://bugs.ruby-lang.org/issues/15211#change-74334

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I found `Integer` doesn't have `try_convert` method, which converts the argument by `to_int` method without explicit conversions like `Integer()`.
This is useful to treat an `Integer`-like argument like as methods written in C.

https://github.com/nobu/ruby/tree/feature/Integer.try_convert



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next