aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/xml_mini/nokogiri.rb
diff options
context:
space:
mode:
authorRahul P. Chaudhari <rahul100885@gmail.com>2011-11-28 12:05:39 +0530
committerRahul P. Chaudhari <rahul100885@gmail.com>2011-11-28 12:07:31 +0530
commit20cbf8eddc3844126d20f1218f068889d17b0dcf (patch)
tree504d641db93b236a7ad82671a0009309d27a8e4b /activesupport/lib/active_support/xml_mini/nokogiri.rb
parentb00cf122e2cb9bb326b2ec5ba4c35c1558362109 (diff)
downloadrails-20cbf8eddc3844126d20f1218f068889d17b0dcf.tar.gz
rails-20cbf8eddc3844126d20f1218f068889d17b0dcf.tar.bz2
rails-20cbf8eddc3844126d20f1218f068889d17b0dcf.zip
Used any? instead of length call
Diffstat (limited to 'activesupport/lib/active_support/xml_mini/nokogiri.rb')
-rw-r--r--activesupport/lib/active_support/xml_mini/nokogiri.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/xml_mini/nokogiri.rb b/activesupport/lib/active_support/xml_mini/nokogiri.rb
index 04ec9e8ab8..fb539e9c88 100644
--- a/activesupport/lib/active_support/xml_mini/nokogiri.rb
+++ b/activesupport/lib/active_support/xml_mini/nokogiri.rb
@@ -26,7 +26,7 @@ module ActiveSupport
else
data.ungetc(char)
doc = Nokogiri::XML(data)
- raise doc.errors.first if doc.errors.length > 0
+ raise doc.errors.first if doc.errors.any?
doc.to_hash
end
end