irb/xmp fails because StringInputMethod doesn't support #encoding
% ruby -v -r irb/xmp -e 'xmp("1+2")'
ruby 1.9.1p5000 (2009-01-16 trunk 21610) [i386-darwin9.6.0]
/usr/local/rubybook/lib/ruby/1.9.1/irb/context.rb:166: warning: method redefined; discarding old irb_name
block (2 levels) in each_top_level_statement': undefined method encoding' for #XMP::StringInputMethod:0x3e1e44 (NoMethodError)
loop' from /usr/local/rubybook/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in block in each_top_level_statement'
catch' from /usr/local/rubybook/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in each_top_level_statement'
eval_input' from /usr/local/rubybook/lib/ruby/1.9.1/irb/xmp.rb:49:in block in puts'
catch' from /usr/local/rubybook/lib/ruby/1.9.1/irb/xmp.rb:48:in puts'
xmp' from -e:1:in '
Updated by pragdave (Dave Thomas) over 13 years ago
On Jan 17, 2009, at 3:05 AM, Yuki Sonoda wrote:
Issue #1019 has been updated by Yuki Sonoda.
Status changed from Open to Closed
% Done changed from 0 to 100
Applied in changeset r21625.¶
An impressively fast fix!
I'm still seeing two warnings, though:
dave[RUBY3/Book 10:03:50*] ruby -v -r irb/xmp -e 'xmp("1+2")'
ruby 1.9.1p5000 (2009-01-18 trunk 21639) [i386-darwin9.6.0]
/usr/local/rubybook/lib/ruby/1.9.1/irb/context.rb:166: warning: method
redefined; discarding old irb_name
/usr/local/rubybook/lib/ruby/1.9.1/irb/xmp.rb:75: warning: instance
variable @encoding not initialized