Skip to content

Commit

Permalink
Fixed incompatibility with Ruby 1.9.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
sporkmonger committed Feb 24, 2009
1 parent 8d367fc commit dc2c0dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
require 'spec/rake/spectask'

require File.join(File.dirname(__FILE__), 'lib/addressable', 'version')
Expand Down
3 changes: 3 additions & 0 deletions lib/addressable/idna.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def self.to_ascii(input)
if input =~ UTF8_REGEX && input =~ UTF8_REGEX_MULTIBYTE
parts = unicode_downcase(input).split('.')
parts.map! do |part|
if part.respond_to?(:force_encoding)
part.force_encoding(Encoding::ASCII_8BIT)
end
if part =~ UTF8_REGEX && part =~ UTF8_REGEX_MULTIBYTE
ACE_PREFIX + punycode_encode(unicode_normalize_kc(part))
else
Expand Down

0 comments on commit dc2c0dc

Please sign in to comment.