Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

got ArgumentError when source includes non-ascii chars. #7

Merged
merged 1 commit into from

2 participants

@moro

Hi, I'm using ruby-debug19 and linecache19 every day. I thank your work.

Recently, I got ArgumentError caused by Ruby 1.9 encoding mechanism when debugger tried to show my codes which includes non-ascii words(UTF-8 japanese word).

I made workaround for the problem. I would like you to merge mine into your work.

Thanks.

@mark-moseley mark-moseley merged commit 27d08a7 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 22, 2011
  1. @moro
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.