to_xs has changed in builder 3 fast_xs should deal with it #1

Open
SamSaffron opened this Issue Oct 1, 2011 · 2 comments

Comments

Projects
None yet
2 participants
class String
  # XML escaped version of to_s. When <tt>escape</tt> is set to false
  # the CP1252 fix is still applied but utf-8 characters are not
  # converted to character entities.
  def to_xs(escape=true)
    unpack('U*').map {|n| n.xchr(escape)}.join # ASCII, UTF-8
  rescue
    unpack('C*').map {|n| n.xchr}.join # ISO-8859-1, WIN-1252
  end
end

at the moment fast_xs blows up on an instruct! in rails 3.1

rubydog commented Mar 21, 2012

Yes problem is little but annoying. Please fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment