1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

try to appease the angry Oracle

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2006-12-29 19:05:53 +00:00
parent 0bfabaa048
commit 6a5388b654
2 changed files with 2 additions and 2 deletions

View file

@ -1979,7 +1979,7 @@ module ActiveRecord #:nodoc:
else
column = self.class.columns_hash[attr_name]
if column.nil?
if value !~ /[^0-9]/
if Numeric === value || value !~ /[^0-9]/
!value.to_i.zero?
else
!value.blank?

View file

@ -314,7 +314,7 @@ class BasicsTest < Test::Unit::TestCase
object.string_value = " "
assert !object.string_value?
assert_equal "1", object.int_value
assert_equal 1, object.int_value.to_i
assert object.int_value?
object.int_value = "0"