Skip to content

Commit

Permalink
Applied arity patch for to_xs
Browse files Browse the repository at this point in the history
Needed for weird compatibility issues with Rails.
  • Loading branch information
jimweirich committed Sep 6, 2012
1 parent 1d680bd commit 97067cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/builder/xmlbase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def _escape(text)
end
else
def _escape(text)
text.to_xs((@encoding != 'utf-8' or $KCODE != 'UTF8'))
if (text.method(:to_xs).arity == 0)
text.to_xs
else
text.to_xs((@encoding != 'utf-8' or $KCODE != 'UTF8'))
end
end
end

Expand Down

0 comments on commit 97067cb

Please sign in to comment.