mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* array.c (rb_ary_pop): may cause realloc oscillation. a patch
from MORITA Naoyuki <mlgetter at kidou.sakura.ne.jp>. [ruby-dev:29028] * parse.y (then): we'd like to reserve colon here for the future. warning added. * ruby.h: export rb_cMethod. [ruby-talk:201259] * ext/bigdecimal/bigdecimal.c: Allows '_' to appear within digits. [ruby-dev:28872] * ext/bigdecimal/lib/bigdecimal/util.rb: Bug in to_r reported by [ruby-list:42533] fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f6444f71d
commit
b268c7309e
6 changed files with 46 additions and 6 deletions
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,9 @@
|
|||
Fri Jul 14 00:10:15 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* array.c (rb_ary_pop): may cause realloc oscillation. a patch
|
||||
from MORITA Naoyuki <mlgetter at kidou.sakura.ne.jp>.
|
||||
[ruby-dev:29028]
|
||||
|
||||
Thu Jul 13 22:23:56 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/lib/tk/composite.rb: improve handling of the classname on the
|
||||
|
@ -8,6 +14,15 @@ Thu Jul 13 20:32:19 2006 Kouhei Sutou <kou@cozmixng.org>
|
|||
* lib/rss/parser.rb: updated documents by a patch from
|
||||
Hugh Sasse <hgs at dmu.ac.uk>. [ruby-core:8194]
|
||||
|
||||
Wed Jul 12 13:54:09 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* parse.y (then): we'd like to reserve colon here for the future.
|
||||
warning added.
|
||||
|
||||
Tue Jul 11 20:58:18 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* ruby.h: export rb_cMethod. [ruby-talk:201259]
|
||||
|
||||
Tue Jul 11 19:13:33 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/lib/multi-tk.rb: remove restriction on the class of
|
||||
|
@ -21,6 +36,14 @@ Tue Jul 11 17:33:39 2006 NAKAMURA Usaku <usa@ruby-lang.org>
|
|||
|
||||
* string.c (rb_str_dump): need to extend len for \b.
|
||||
|
||||
Mon Jul 10 22:00:00 2006 Shigeo Kobayashi <shigek@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c: Allows '_' to appear within
|
||||
digits. [ruby-dev:28872]
|
||||
|
||||
* ext/bigdecimal/lib/bigdecimal/util.rb: Bug in to_r reported by
|
||||
[ruby-list:42533] fixed.
|
||||
|
||||
Mon Jul 10 19:22:19 2006 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* gc.c (gc_sweep): expand heap earlier.
|
||||
|
|
3
eval.c
3
eval.c
|
@ -234,7 +234,8 @@ static VALUE rb_f_binding _((VALUE));
|
|||
static void rb_f_END _((void));
|
||||
static VALUE rb_f_block_given_p _((void));
|
||||
static VALUE block_pass _((VALUE,NODE*));
|
||||
static VALUE rb_cMethod;
|
||||
|
||||
VALUE rb_cMethod;
|
||||
static VALUE method_call _((int, VALUE*, VALUE));
|
||||
static VALUE rb_cUnboundMethod;
|
||||
static VALUE umethod_bind _((VALUE, VALUE));
|
||||
|
|
|
@ -2496,14 +2496,25 @@ VpAlloc(U_LONG mx, char *szVal)
|
|||
return vp;
|
||||
}
|
||||
|
||||
/* Skip all spaces */
|
||||
/* Skip all '_' after digit: 2006-6-30 */
|
||||
ni = 0;
|
||||
psz = ALLOCA_N(char,strlen(szVal)+1);
|
||||
i = 0;
|
||||
ipn = 0;
|
||||
while(psz[i]=szVal[ipn]) {
|
||||
if(ISSPACE(szVal[ipn])) {ipn++;continue;}
|
||||
if(ISDIGIT(psz[i])) ++ni;
|
||||
if(psz[i]=='_') {
|
||||
if(ni>0) {ipn++;continue;}
|
||||
psz[i]=0;
|
||||
break;
|
||||
}
|
||||
++i; ++ipn;
|
||||
}
|
||||
/* Skip trailing spaces */
|
||||
while((--i)>0) {
|
||||
if(ISSPACE(psz[i])) psz[i] = 0;
|
||||
else break;
|
||||
}
|
||||
szVal = psz;
|
||||
|
||||
/* Check on Inf & NaN */
|
||||
|
|
|
@ -46,11 +46,10 @@ class BigDecimal < Numeric
|
|||
numerator = sign*digits.to_i
|
||||
denomi_power = power - digits.size # base is always 10
|
||||
if denomi_power < 0
|
||||
denominator = base ** (-denomi_power)
|
||||
Rational(numerator,base ** (-denomi_power))
|
||||
else
|
||||
denominator = base ** denomi_power
|
||||
Rational(numerator * (base ** denomi_power),1)
|
||||
end
|
||||
Rational(numerator,denominator)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
5
parse.y
5
parse.y
|
@ -1731,6 +1731,11 @@ primary_value : primary
|
|||
|
||||
then : term
|
||||
| ':'
|
||||
{
|
||||
rb_warn("colon will be obsoleted; use semicolon");
|
||||
value_expr($1);
|
||||
$$ = $1;
|
||||
}
|
||||
| kTHEN
|
||||
| term kTHEN
|
||||
;
|
||||
|
|
1
ruby.h
1
ruby.h
|
@ -592,6 +592,7 @@ RUBY_EXTERN VALUE rb_cFloat;
|
|||
RUBY_EXTERN VALUE rb_cHash;
|
||||
RUBY_EXTERN VALUE rb_cInteger;
|
||||
RUBY_EXTERN VALUE rb_cIO;
|
||||
RUBY_EXTERN VALUE rb_cMethod;
|
||||
RUBY_EXTERN VALUE rb_cModule;
|
||||
RUBY_EXTERN VALUE rb_cNilClass;
|
||||
RUBY_EXTERN VALUE rb_cNumeric;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue