Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #7 from moro/master

got ArgumentError when source includes non-ascii chars.
  • Loading branch information...
commit 27d08a73382d10b9d79a765182a2a9b1c74661f8 2 parents 8fcb86e + 4084c4e
@mark-moseley authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/linecache19.rb
View
3  lib/linecache19.rb
@@ -333,6 +333,9 @@ def update_cache(filename, use_script_lines=false)
stat = nil
end
lines = SCRIPT_LINES__[name]
+ if "ruby19".respond_to?(:force_encoding)
+ lines.each{|l| l.force_encoding(Encoding.default_external) }
+ end
@@file_cache[filename] = LineCacheInfo.new(stat, nil, lines, path, nil)
@@file2file_remap[path] = filename
return true
Please sign in to comment.
Something went wrong with that request. Please try again.