mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* time.c (quo, time_mdump): use RRATIONAL().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e916ccc5cd
commit
572c266e05
2 changed files with 6 additions and 6 deletions
8
time.c
8
time.c
|
@ -179,8 +179,8 @@ quo(VALUE x, VALUE y)
|
|||
VALUE ret;
|
||||
ret = rb_funcall((x), id_quo, 1, (y));
|
||||
if (TYPE(ret) == T_RATIONAL &&
|
||||
((struct RRational *)ret)->den == INT2FIX(1)) {
|
||||
ret = ((struct RRational *)ret)->num;
|
||||
RRATIONAL(ret)->den == INT2FIX(1)) {
|
||||
ret = RRATIONAL(ret)->num;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -3648,8 +3648,8 @@ time_mdump(VALUE time)
|
|||
rb_copy_generic_ivar(str, time);
|
||||
if (!rb_equal(nano, INT2FIX(0))) {
|
||||
if (TYPE(nano) == T_RATIONAL) {
|
||||
rb_ivar_set(str, id_nano_num, ((struct RRational *)nano)->num);
|
||||
rb_ivar_set(str, id_nano_den, ((struct RRational *)nano)->den);
|
||||
rb_ivar_set(str, id_nano_num, RRATIONAL(nano)->num);
|
||||
rb_ivar_set(str, id_nano_den, RRATIONAL(nano)->den);
|
||||
}
|
||||
else {
|
||||
rb_ivar_set(str, id_nano_num, nano);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "1.9.2"
|
||||
#define RUBY_RELEASE_DATE "2010-02-03"
|
||||
#define RUBY_RELEASE_DATE "2010-02-04"
|
||||
#define RUBY_PATCHLEVEL -1
|
||||
#define RUBY_BRANCH_NAME "trunk"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
#define RUBY_VERSION_TEENY 1
|
||||
#define RUBY_RELEASE_YEAR 2010
|
||||
#define RUBY_RELEASE_MONTH 2
|
||||
#define RUBY_RELEASE_DAY 3
|
||||
#define RUBY_RELEASE_DAY 4
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue