Bug #1019

irb/xmp fails because StringInputMethod doesn't support #encoding

Added by Dave Thomas over 6 years ago. Updated almost 4 years ago.

[ruby-core:21383]
Status:Closed
Priority:Normal
Assignee:-
ruby -v: Backport:

Description

=begin
% 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
1+2
/usr/local/rubybook/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in block (2 levels) in each_top_level_statement': undefined methodencoding' for #XMP::StringInputMethod:0x3e1e44 (NoMethodError)
from /usr/local/rubybook/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in loop'
from /usr/local/rubybook/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in
block in each_top_level_statement'
from /usr/local/rubybook/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in catch'
from /usr/local/rubybook/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
each_top_level_statement'
from /usr/local/rubybook/lib/ruby/1.9.1/irb.rb:145:in eval_input'
from /usr/local/rubybook/lib/ruby/1.9.1/irb/xmp.rb:49:in
block in puts'
from /usr/local/rubybook/lib/ruby/1.9.1/irb/xmp.rb:48:in catch'
from /usr/local/rubybook/lib/ruby/1.9.1/irb/xmp.rb:48:in
puts'
from /usr/local/rubybook/lib/ruby/1.9.1/irb/xmp.rb:83:in xmp'
from -e:1:in
'
=end

History

#1 Updated by Yuki Sonoda over 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r21625.
=end

#2 Updated by Dave Thomas over 6 years ago

=begin

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.

http://redmine.ruby-lang.org/issues/show/1019


http://redmine.ruby-lang.org

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
1+2
==>3

=end

Also available in: Atom PDF