Remove Ruby <1.9 core extensions
This commit is contained in:
parent
6ad0be7c6e
commit
d130fd13dc
|
@ -54,14 +54,6 @@ class Hash
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Thanks, ActiveSupport!
|
|
||||||
class Date
|
|
||||||
# Converts datetime to an appropriate format for use in XML
|
|
||||||
def xmlschema
|
|
||||||
strftime("%Y-%m-%dT%H:%M:%S%Z")
|
|
||||||
end if RUBY_VERSION < '1.9'
|
|
||||||
end
|
|
||||||
|
|
||||||
module Enumerable
|
module Enumerable
|
||||||
# Returns true if path matches against any glob pattern.
|
# Returns true if path matches against any glob pattern.
|
||||||
# Look for more detail about glob pattern in method File::fnmatch.
|
# Look for more detail about glob pattern in method File::fnmatch.
|
||||||
|
@ -74,13 +66,7 @@ end
|
||||||
# read_with_options ignore optional parameter for 1.8,
|
# read_with_options ignore optional parameter for 1.8,
|
||||||
# and act as alias for 1.9 or later.
|
# and act as alias for 1.9 or later.
|
||||||
class File
|
class File
|
||||||
if RUBY_VERSION < '1.9'
|
|
||||||
def self.read_with_options(path, opts = {})
|
|
||||||
self.read(path)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
def self.read_with_options(path, opts = {})
|
def self.read_with_options(path, opts = {})
|
||||||
self.read(path, opts)
|
self.read(path, opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
Loading…
Reference in New Issue