Skip to content

Instantly share code, notes, and snippets.

@authorNari
Created January 14, 2011 05:22
Show Gist options
  • Save authorNari/779210 to your computer and use it in GitHub Desktop.
Save authorNari/779210 to your computer and use it in GitHub Desktop.
require "irb"
Encoding.default_internal = "cp932"
Encoding.default_external = "cp932"
path = "/home/nari/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/irb/lc/ja/error.rb"
src = IRB::MagicFile.open(path){|f| f.read}
p src.encoding
eval(src)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment