Skip to content

Commit

Permalink
merge revision(s) 26032:
Browse files Browse the repository at this point in the history
	* object.c (rb_Float): Allow results of to_f to be NaN
	  [ruby-core:26733]


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7@26092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shyouhei committed Dec 14, 2009
1 parent b1f6853 commit 97c4b95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Mon Dec 14 12:40:10 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>

* object.c (rb_Float): Allow results of to_f to be NaN
[ruby-core:26733]

Mon Dec 14 12:35:21 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>

* eval.c (proc_invoke): unbound block created by define_method
Expand Down
9 changes: 2 additions & 7 deletions object.c
Expand Up @@ -2470,13 +2470,8 @@ rb_Float(val)
break;

default:
{
VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
if (isnan(RFLOAT(f)->value)) {
rb_raise(rb_eArgError, "invalid value for Float()");
}
return f;
}
return rb_convert_type(val, T_FLOAT, "Float", "to_f");

}
}

Expand Down
2 changes: 1 addition & 1 deletion version.h
Expand Up @@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2009-12-14"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20091214
#define RUBY_PATCHLEVEL 235
#define RUBY_PATCHLEVEL 236

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
Expand Down

0 comments on commit 97c4b95

Please sign in to comment.