mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r23739 from trunk into ruby_1_9_1.
-- * bignum.c (big_lshift, big_rshift): return Bignum always without normalization. [ruby-dev:38679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4c52c1c5ed
commit
979153cf9b
3 changed files with 65 additions and 8 deletions
57
ChangeLog
57
ChangeLog
|
@ -1,3 +1,8 @@
|
|||
Fri Jun 19 08:14:07 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* bignum.c (big_lshift, big_rshift): return Bignum always withou
|
||||
normalization. [ruby-dev:38679]
|
||||
|
||||
Thu Jun 18 20:32:11 2009 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* numeric.c ( num_numerator, num_denominator): use
|
||||
|
@ -47,7 +52,59 @@ Wed Jun 17 07:36:22 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
|||
* lib/webrick/httputils.rb (parse_form_data): escape boundary of
|
||||
multipart/form-data when embed in regexp.
|
||||
|
||||
<<<<<<< HEAD:ChangeLog
|
||||
Tue Jun 16 22:47:37 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
=======
|
||||
Wed Jun 17 07:24:26 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* array.c (rb_ary_memsize): added.
|
||||
|
||||
* io.c (rb_io_memsize): added.
|
||||
|
||||
* regcomp.c (onig_memsize): added.
|
||||
|
||||
* string.c (rb_str_memsize): added.
|
||||
|
||||
* transcode.c (rb_transcoding_memsize, rb_econv_memsize): added.
|
||||
|
||||
* variable.c (rb_geneic_ivar_memsize): added.
|
||||
|
||||
Wed Jun 17 07:04:33 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* iseq.c (iseq_memsize): added. Use RTypedData instead of RData
|
||||
for ISeq.
|
||||
|
||||
* vm.c (env_memsize, vm_memsize, thread_memsize): added. Use
|
||||
RTypedData instead of RData for Env, VM, Thread.
|
||||
|
||||
Wed Jun 17 06:48:28 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* st.c, include/ruby/st.h (st_memsize): added. This function returns
|
||||
the memory usage of st_table.
|
||||
|
||||
Wed Jun 17 06:19:06 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* include/ruby/ruby.h: New structure RTypedData, added.
|
||||
This structure incldues more explicit type information for
|
||||
T_DATA objects. If RData(obj)->dfree is immediate value `1' on
|
||||
T_DATA object obj, obj is needed to be accessed with RTYPEDDATA(obj)
|
||||
instead of RDATA(obj). A RTypedData structure points the structure
|
||||
rb_typed_data_t. rb_typed_data_t includes information such as the
|
||||
type name of this data, mark and free function what RData includes,
|
||||
and memsize function show how data consuming the memory size.
|
||||
Note that you do not need any change existing T_DATA objects.
|
||||
If you use RDataType instead of RData on T_DATA object,
|
||||
you can specify explicit type information.
|
||||
|
||||
* gc.c (rb_data_typed_object_alloc, rb_objspace_data_type_memsize,
|
||||
rb_objspace_data_type_name): added.
|
||||
|
||||
Wed Jun 17 06:14:23 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c: fix indent.
|
||||
|
||||
Wed Jun 17 06:05:03 2009 Koichi Sasada <ko1@atdot.net>
|
||||
>>>>>>> 1b4d30a... * bignum.c (big_lshift, big_rshift): return Bignum always without:ChangeLog
|
||||
|
||||
* io.c (fptr_finalize): skip close(2) for fd 0,1,2.
|
||||
|
||||
|
|
14
bignum.c
14
bignum.c
|
@ -1981,7 +1981,7 @@ static VALUE big_shift(VALUE x, int n)
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* big.fdiv(numeric) -> float
|
||||
* big.fdiv(numeric) -> float
|
||||
*
|
||||
* Returns the floating point result of dividing <i>big</i> by
|
||||
* <i>numeric</i>.
|
||||
|
@ -2383,8 +2383,8 @@ rb_big_lshift(VALUE x, VALUE y)
|
|||
y = rb_to_int(y);
|
||||
}
|
||||
|
||||
if (neg) return big_rshift(x, shift);
|
||||
return big_lshift(x, shift);
|
||||
x = neg ? big_rshift(x, shift) : big_lshift(x, shift);
|
||||
return bignorm(x);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
@ -2410,7 +2410,7 @@ big_lshift(VALUE x, unsigned long shift)
|
|||
num = BIGDN(num);
|
||||
}
|
||||
*zds = BIGLO(num);
|
||||
return bignorm(z);
|
||||
return z;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2449,8 +2449,8 @@ rb_big_rshift(VALUE x, VALUE y)
|
|||
y = rb_to_int(y);
|
||||
}
|
||||
|
||||
if (neg) return big_lshift(x, shift);
|
||||
return big_rshift(x, shift);
|
||||
x = neg ? big_lshift(x, shift) : big_rshift(x, shift);
|
||||
return bignorm(x);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
@ -2493,7 +2493,7 @@ big_rshift(VALUE x, unsigned long shift)
|
|||
if (!RBIGNUM_SIGN(x)) {
|
||||
get2comp(z);
|
||||
}
|
||||
return bignorm(z);
|
||||
return z;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "1.9.1"
|
||||
#define RUBY_RELEASE_DATE "2009-05-22"
|
||||
#define RUBY_PATCHLEVEL 191
|
||||
#define RUBY_PATCHLEVEL 192
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 9
|
||||
#define RUBY_VERSION_TEENY 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue