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

Added Object#blank? -- see http://redhanded.hobix.com/inspect/objectBlank.html #783 [_why the lucky stiff]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-03-06 14:22:21 +00:00
parent 10a86b21fb
commit 4ef7bfb016
2 changed files with 12 additions and 0 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Added Object#blank? -- see http://redhanded.hobix.com/inspect/objectBlank.html #783 [_why the lucky stiff]
* Added inflection rules for "sh" words, like "wish" and "fish" #755 [phillip@pjbsoftware.com]
* Fixed an exception when using Ajax based requests from Safari because Safari appends a \000 to the post body. Symbols can't have \000 in them so indifferent access would throw an exception in the constructor. Indifferent hashes now use strings internally instead. #746 [Tobias Luetke]

View file

@ -11,6 +11,16 @@ class Object #:nodoc:
end
subclasses
end
def blank?
if respond_to? :empty?
empty?
elsif respond_to? :zero?
zero?
else
!self
end
end
end
class Class #:nodoc: