Skip to content

Instantly share code, notes, and snippets.

@rawsyntax
Created January 21, 2011 03:26
Show Gist options
  • Save rawsyntax/789195 to your computer and use it in GitHub Desktop.
Save rawsyntax/789195 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'uri'
URI.parse("кц.рф")
# fails with the following error
#
#/Users/eric/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/uri/common.rb:156:in `split': bad URI(is not
# URI?): кц.рф (URI::InvalidURIError)
# from /Users/eric/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/uri/common.rb:174:in `parse'
# from /Users/eric/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/uri/common.rb:628:in `parse'
# from ./uri-parse.rb:6:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment