Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Psych correctly gets visitor for SafeBuffer from superclass

  • Loading branch information...
commit eb33bd944d03d174ac7eac5d59fc280b35b1a3bd 1 parent 452dba7
@brainopia brainopia authored tenderlove committed
View
7 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -1,5 +1,6 @@
require 'erb'
require 'active_support/core_ext/kernel/singleton_class'
+require 'active_support/core_ext/yaml'
class ERB
module Util
@@ -101,8 +102,10 @@ def to_s
self
end
- def to_yaml(*args)
- to_str.to_yaml(*args)
+ unless defined?(Psych)
+ def to_yaml(*args)
+ to_str.to_yaml(*args)
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.