Fix for issue 2182 on jruby-1_7 : Struct#inspect with utf8 encode string member#2321
Conversation
|
Converting to a Java charset feels really wrong to me. For 1.9 support I would almost prefer working directly with a RubyString and using cat19 over that. The main problem is not all supported Encodings in Ruby have an equaivalent Java Charset (although this is pretty rare). I won't close this atm and perhaps @headius or @lopex may have a better solution. I feel like this entire method needs to be rewritten and split out from the 1.8 version on it atm. |
|
MRI uses rb_str_append for members and rb_str_cat2 for fixed parts of the result |
4d99577 to
1a9ef29
Compare
|
@k77ch7 Since your second commit corrects flaws (duplication of cat19 logic) in the first one, can you force push this all as a single commit please? Thanks for your help! |
1a9ef29 to
4bf84a9
Compare
4bf84a9 to
5879d5b
Compare
|
@headius Thanks for reviewing. I just pushed. |
Fix for issue 2182 on jruby-1_7 : Struct#inspect with utf8 encode string member
This commit fixes issue #2182 on jruby-1_7 branch. Inspect method of Struct with utf8 string member should return a utf8 string.