mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 15084:
* lib/date.rb (Date::Infinity#<=>): didn't work. A patch from Dirkjan Bussink <d.bussink AT gmail.com> [ruby-core:15098]. This is a bug obviously. However it didn't affect the library's functions. * lib/date.rb, lib/date/format.rb: some trivial changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@21222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
655e3143b3
commit
08ba6b3f36
4 changed files with 20 additions and 10 deletions
|
|
@ -1,3 +1,12 @@
|
||||||
|
Thu Jan 1 08:39:36 2009 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
|
* lib/date.rb (Date::Infinity#<=>): didn't work. A patch from
|
||||||
|
Dirkjan Bussink <d.bussink AT gmail.com> [ruby-core:15098].
|
||||||
|
This is a bug obviously. However it didn't affect the library's
|
||||||
|
functions.
|
||||||
|
|
||||||
|
* lib/date.rb, lib/date/format.rb: some trivial changes.
|
||||||
|
|
||||||
Mon Aug 11 09:34:52 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Mon Aug 11 09:34:52 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* ext/dl/dl.c (rb_str_to_ptr): should propagate taint to dlptr.
|
* ext/dl/dl.c (rb_str_to_ptr): should propagate taint to dlptr.
|
||||||
|
|
|
||||||
|
|
@ -275,8 +275,8 @@ class Date
|
||||||
|
|
||||||
def <=> (other)
|
def <=> (other)
|
||||||
case other
|
case other
|
||||||
when Infinity; d <=> other.d
|
when Infinity; return d <=> other.d
|
||||||
when Numeric; d
|
when Numeric; return d
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
l, r = other.coerce(self)
|
l, r = other.coerce(self)
|
||||||
|
|
|
||||||
|
|
@ -239,12 +239,12 @@ class Date
|
||||||
when 'j'; emit_n(yday, 3, f)
|
when 'j'; emit_n(yday, 3, f)
|
||||||
when 'k'; emit_a(hour, 2, f)
|
when 'k'; emit_a(hour, 2, f)
|
||||||
when 'L'
|
when 'L'
|
||||||
emit_n((sec_fraction / (1.to_r/86400/(10**3))).round, 3, f)
|
emit_n((sec_fraction / (1.to_r/86400/(10**3))).floor, 3, f)
|
||||||
when 'l'; emit_a((hour % 12).nonzero? || 12, 2, f)
|
when 'l'; emit_a((hour % 12).nonzero? || 12, 2, f)
|
||||||
when 'M'; emit_n(min, 2, f)
|
when 'M'; emit_n(min, 2, f)
|
||||||
when 'm'; emit_n(mon, 2, f)
|
when 'm'; emit_n(mon, 2, f)
|
||||||
when 'N'
|
when 'N'
|
||||||
emit_n((sec_fraction / (1.to_r/86400/(10**9))).round, 9, f)
|
emit_n((sec_fraction / (1.to_r/86400/(10**9))).floor, 9, f)
|
||||||
when 'n'; "\n"
|
when 'n'; "\n"
|
||||||
when 'P'; emit_ad(strftime('%p').downcase, 0, f)
|
when 'P'; emit_ad(strftime('%p').downcase, 0, f)
|
||||||
when 'p'; emit_au(if hour < 12 then 'AM' else 'PM' end, 0, f)
|
when 'p'; emit_au(if hour < 12 then 'AM' else 'PM' end, 0, f)
|
||||||
|
|
|
||||||
13
version.h
13
version.h
|
|
@ -1,15 +1,15 @@
|
||||||
#define RUBY_VERSION "1.8.6"
|
#define RUBY_VERSION "1.8.6"
|
||||||
#define RUBY_RELEASE_DATE "2008-08-11"
|
#define RUBY_RELEASE_DATE "2009-01-01"
|
||||||
#define RUBY_VERSION_CODE 186
|
#define RUBY_VERSION_CODE 186
|
||||||
#define RUBY_RELEASE_CODE 20080811
|
#define RUBY_RELEASE_CODE 20090101
|
||||||
#define RUBY_PATCHLEVEL 287
|
#define RUBY_PATCHLEVEL 288
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 8
|
#define RUBY_VERSION_MINOR 8
|
||||||
#define RUBY_VERSION_TEENY 6
|
#define RUBY_VERSION_TEENY 6
|
||||||
#define RUBY_RELEASE_YEAR 2008
|
#define RUBY_RELEASE_YEAR 2009
|
||||||
#define RUBY_RELEASE_MONTH 8
|
#define RUBY_RELEASE_MONTH 1
|
||||||
#define RUBY_RELEASE_DAY 11
|
#define RUBY_RELEASE_DAY 1
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
|
@ -19,3 +19,4 @@ RUBY_EXTERN const int ruby_patchlevel;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue