Skip to content
This repository was archived by the owner on Apr 22, 2021. It is now read-only.

Update rails 2.3 lts to run on ruby 2+#1

Open
snorecone wants to merge 9 commits into
2-3-ltsfrom
2-3-ruby2
Open

Update rails 2.3 lts to run on ruby 2+#1
snorecone wants to merge 9 commits into
2-3-ltsfrom
2-3-ruby2

Conversation

@snorecone
Copy link
Copy Markdown

The patches should be fairly self-explanatory. They include:

  • force-encoding params to utf-8
  • the behavior of respond_to? change to include protected methods
  • use native encode for html (xml) escaping
  • updates to work with the new rubygems API

I also snuck in a change to work with mysql 5.7 and upgraded libxml-ruby because it seemed safe and important.

Copy link
Copy Markdown

@lmarburger lmarburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's all it takes?!

else
s.gsub(/[&"'><]/n) { |special| HTML_ESCAPE[special] }.html_safe
# Detect whether 1.9 can transcode with XML escaping.
if '"&gt;&lt;&amp;&quot;"' == ('><&"'.encode('utf-8', :xml => :attr) rescue false)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants