Skip to content
This repository has been 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
wants to merge 9 commits into
base: 2-3-lts
Choose a base branch
from
Open

Conversation

snorecone
Copy link

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

@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)

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