ruby-changes:10080
From: yugui <ko1@a...>
Date: Sat, 17 Jan 2009 15:40:09 +0900 (JST)
Subject: [ruby-changes:10080] Ruby:r21623 (ruby_1_9_1): merges r21179 from trunk into ruby_1_9_1.
yugui 2009-01-17 15:38:58 +0900 (Sat, 17 Jan 2009) New Revision: 21623 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21623 Log: merges r21179 from trunk into ruby_1_9_1. * pack.c (pack_pack): template f should not accept non float values. [ruby-dev:37656] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/include/ruby/intern.h branches/ruby_1_9_1/pack.c Index: ruby_1_9_1/include/ruby/intern.h =================================================================== --- ruby_1_9_1/include/ruby/intern.h (revision 21622) +++ ruby_1_9_1/include/ruby/intern.h (revision 21623) @@ -452,6 +452,7 @@ 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); Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21622) +++ ruby_1_9_1/ChangeLog (revision 21623) @@ -1,3 +1,10 @@ +Mon Dec 29 22:37:57 2008 Yukihiro Matsumoto <matz@r...> + + * 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@r...> * tool/make-snapshot (package): includes all rules and expand Index: ruby_1_9_1/pack.c =================================================================== --- ruby_1_9_1/pack.c (revision 21622) +++ ruby_1_9_1/pack.c (revision 21623) @@ -789,7 +789,7 @@ 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/