[Ruby 1.9-Bug#3830][Open] ruby 1.9.2 で Net::Telnet の close が undefined method

Bug #3830: ruby 1.9.2 e$B$Ge(B Net::Telnet e$B$Ne(B close e$B$,e(B
undefined method e$B$H$J$j<B9T$G$-$J$$e(B
http://redmine.ruby-lang.org/issues/show/3830

e$B5/I<<Te(B: [email protected];?Me(B e$B_@Lne(B
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]

[email protected]$H?=$7$^$9!#e(B
ruby-list:47391 e$B$+$i$O$8$^$k%9%l%C%I$G?R$M$?e(B Ruby 1.9.2-p0
e$B$K$*$1$ke(B
Net::Telenet e$B$NIT6q9g$K$D$$$FJs9p$5$;$FD:$-$^$9!#e(B

ruby-1.9.2-p0 e$B$Ge(B Net::Telnet e$B%/%i%9$r;H$C$F$$$?$H$3$m!"e(Bclose
e$B$r<Be(B
e$B9T$7$h$&$H$7$?$H$3$m!"e(Bundefined method
[email protected]$o$l$k8=>]$KAx6x$7$^$7e(B
e$B$?!#e(B

ruby-list e$B$G?R$M$?$H$3$m!"860x$O!"e(BSimpleDelegator
e$B$r$d$a$F$7$^$C$?e(B
e$B$N$Ge(B @sock
e$B$K0Q>y$7$F$$$?%a%=%C%I$,;H$($J$/$J$C$F$7$^$C$?$?$a$H$Ne(B
e$B2sEz$rD:$-$^$7$?!#e(B

e$B?=$7J,$1$"$j$^$;$s$,!"$3$N7o$K$D$$$F!"$4BP1~4j$($J$$$G$7$g$&$+!#e(B

e$B0J2<!"$b$&>/$7>:Y$K=q$-$^$9!#e(B

[e$B:F8=J}K!e(B]
e$B0J2<$N%W%m%0%i%`$r!"!Ve(BIP
e$B%"%I%l%9!W$KE,@Z$JCM$rF~$l!"e(Bruby-1.9.2-p0 e$B$G<Be(B
e$B9T$9$k!#e(B

#!/usr/bin/env ruby

require 'net/telnet'

connect = Net::Telnet.new("Host" => "IP e$B%"%I%l%9e(B", "Timeout" => 
120)

print "closing ..."
connect.close()
print "done\n"

# t.rb ends here

[e$B7k2Le(B]
ruby 1.9.2-p0 e$B$G9T$C$?>l9g$N7k2L$G$9!#e(B

$ lsb_release -d
Description:    Debian GNU/Linux unstable (sid)
$ ruby-192 -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
$ ruby-192 /tmp/t.rb
closing .../tmp/t.rb:8:in `': undefined method `close' for 
# (NoMethodError)

[e$B4|BT$9$k7k2Le(B]
ruby 1.8.7 e$B$G9T$C$?>l9g$N7k2L$G$9!#e(B

$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]
$ ruby /tmp/t.rb
closing ...done

[e$B;CDjE*$J2r7h:ve(B]
e$B0J2<$N%3!<%I$r%W%m%0%i%`$KDI2C$9$k;v$G!"e(Bruby-1.9.2-p0
e$B$G$b4|BT$9$k7k2Le(B
[email protected]$i$l$^$7$?!#e(B

require 'net/telnet'
class Net::Telnet
  def method_missing(m, *args, &block)
    @sock.__send__(m, *args, &block)
  end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs