parent
11acbfc41c
commit
d1239bd716
|
@ -129,6 +129,10 @@ itself, JRuby and Rubinius.
|
|||
|
||||
- `dirname` (with depth argument)
|
||||
|
||||
#### Integer
|
||||
|
||||
- `try_convert`
|
||||
|
||||
#### MatchData
|
||||
|
||||
- `match`
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
require 'backports/tools/require_relative_dir'
|
||||
|
||||
Backports.require_relative_dir
|
|
@ -0,0 +1,7 @@
|
|||
class Integer
|
||||
require 'backports/tools/arguments'
|
||||
|
||||
def self.try_convert(obj)
|
||||
::Backports.try_convert(obj, ::Integer, :to_int)
|
||||
end
|
||||
end unless Integer.respond_to? :try_convert
|
Loading…
Reference in New Issue