Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/alt/ruby22/lib64/ruby/2.2.0
File: date.rb
# date.rb: Written by Tadayoshi Funaba 1998-2011
[0] Fix | Delete
[1] Fix | Delete
require 'date_core'
[2] Fix | Delete
[3] Fix | Delete
class Date
[4] Fix | Delete
[5] Fix | Delete
class Infinity < Numeric # :nodoc:
[6] Fix | Delete
[7] Fix | Delete
include Comparable
[8] Fix | Delete
[9] Fix | Delete
def initialize(d=1) @d = d <=> 0 end
[10] Fix | Delete
[11] Fix | Delete
def d() @d end
[12] Fix | Delete
[13] Fix | Delete
protected :d
[14] Fix | Delete
[15] Fix | Delete
def zero? () false end
[16] Fix | Delete
def finite? () false end
[17] Fix | Delete
def infinite? () d.nonzero? end
[18] Fix | Delete
def nan? () d.zero? end
[19] Fix | Delete
[20] Fix | Delete
def abs() self.class.new end
[21] Fix | Delete
[22] Fix | Delete
def -@ () self.class.new(-d) end
[23] Fix | Delete
def +@ () self.class.new(+d) end
[24] Fix | Delete
[25] Fix | Delete
def <=> (other)
[26] Fix | Delete
case other
[27] Fix | Delete
when Infinity; return d <=> other.d
[28] Fix | Delete
when Numeric; return d
[29] Fix | Delete
else
[30] Fix | Delete
begin
[31] Fix | Delete
l, r = other.coerce(self)
[32] Fix | Delete
return l <=> r
[33] Fix | Delete
rescue NoMethodError
[34] Fix | Delete
end
[35] Fix | Delete
end
[36] Fix | Delete
nil
[37] Fix | Delete
end
[38] Fix | Delete
[39] Fix | Delete
def coerce(other)
[40] Fix | Delete
case other
[41] Fix | Delete
when Numeric; return -d, d
[42] Fix | Delete
else
[43] Fix | Delete
super
[44] Fix | Delete
end
[45] Fix | Delete
end
[46] Fix | Delete
[47] Fix | Delete
def to_f
[48] Fix | Delete
return 0 if @d == 0
[49] Fix | Delete
if @d > 0
[50] Fix | Delete
Float::INFINITY
[51] Fix | Delete
else
[52] Fix | Delete
-Float::INFINITY
[53] Fix | Delete
end
[54] Fix | Delete
end
[55] Fix | Delete
[56] Fix | Delete
end
[57] Fix | Delete
[58] Fix | Delete
end
[59] Fix | Delete
[60] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function