aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorRafael Mendonça França <rafael.franca@plataformatec.com.br>2012-01-04 12:55:11 -0300
committerRafael Mendonça França <rafael.franca@plataformatec.com.br>2012-01-04 13:21:54 -0300
commit0bf51e9805260243ec0bbe5fca8f8b9364fdd970 (patch)
tree26868888c08692160a58f53b286640e086240545 /activesupport/lib/active_support/core_ext
parente2e4216d645ce32ad11b2a681b45c85025de3d1d (diff)
downloadrails-0bf51e9805260243ec0bbe5fca8f8b9364fdd970.tar.gz
rails-0bf51e9805260243ec0bbe5fca8f8b9364fdd970.tar.bz2
rails-0bf51e9805260243ec0bbe5fca8f8b9364fdd970.zip
No need to check if YAML::ENGINE is defined since ruby 1.9 does that
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/big_decimal/conversions.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb
index 391bdc925d..403e8beac5 100644
--- a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb
@@ -16,7 +16,7 @@ class BigDecimal
#
# Note that reconstituting YAML floats to native floats may lose precision.
def to_yaml(opts = {})
- return super if defined?(YAML::ENGINE) && !YAML::ENGINE.syck?
+ return super if !YAML::ENGINE.syck?
YAML.quick_emit(nil, opts) do |out|
string = to_s
diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb
index 6cb2ea68b3..4e5675cc8d 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -137,7 +137,7 @@ module ActiveSupport #:nodoc:
end
def to_yaml(*args)
- return super() if defined?(YAML::ENGINE) && !YAML::ENGINE.syck?
+ return super() if !YAML::ENGINE.syck?
to_str.to_yaml(*args)
end