mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r21179 from trunk into ruby_1_9_1.
* pack.c (pack_pack): template f should not accept non float values. [ruby-dev:37656] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
95b0640876
commit
8475b6c3c7
3 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Mon Dec 29 22:37:57 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* pack.c (pack_pack): template f should not accept non float
|
||||
values. [ruby-dev:37656]
|
||||
|
||||
* object.c (rb_to_float): new function to type check floats.
|
||||
|
||||
Fri Jan 16 18:43:30 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* tool/make-snapshot (package): includes all rules and expand
|
||||
|
|
|
@ -452,6 +452,7 @@ VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
|
|||
VALUE rb_check_to_integer(VALUE, const char *);
|
||||
VALUE rb_to_int(VALUE);
|
||||
VALUE rb_Integer(VALUE);
|
||||
VALUE rb_to_float(VALUE);
|
||||
VALUE rb_Float(VALUE);
|
||||
VALUE rb_String(VALUE);
|
||||
VALUE rb_Array(VALUE);
|
||||
|
|
2
pack.c
2
pack.c
|
@ -789,7 +789,7 @@ pack_pack(VALUE ary, VALUE fmt)
|
|||
float f;
|
||||
|
||||
from = NEXTFROM;
|
||||
f = RFLOAT_VALUE(rb_Float(from));
|
||||
f = RFLOAT_VALUE(rb_to_float(from));
|
||||
rb_str_buf_cat(res, (char*)&f, sizeof(float));
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue