Rdoc defines Hash#method_missing

e$B1sF#$G$9!#e(B

make test-all e$B$N0J2<$N%(%i!<$K$D$$$F$G$9!#e(B

  1. Error:
    test_starttls(IMAPTest):
    IOError: closed stream
    /home/mame/work/ruby19/ruby/.ext/common/openssl/buffering.rb:240:in
    close' /home/mame/work/ruby19/ruby/.ext/common/openssl/buffering.rb:240:insysclose’
    /home/mame/work/ruby19/ruby/.ext/common/openssl/buffering.rb:240:in
    close' /home/mame/work/ruby19/ruby/lib/net/imap.rb:296:indisconnect’
    /home/mame/work/ruby19/ruby/test/net/imap/test_imap.rb:189:in
    ensure in starttls_test' /home/mame/work/ruby19/ruby/test/net/imap/test_imap.rb:189:instarttls_test’
    /home/mame/work/ruby19/ruby/test/net/imap/test_imap.rb:72:in
    `test_starttls’

e$B$3$N%(%i!<$N860x$O!"e(Blib/rdoc/ri/driver.rb e$B$,e(B Hash e$B$Ke(B
method_missing e$B$re(B
e$BDj5A$7$F$$$k$3$H$G$9!#e(B

class Hash # HACK don’t add stuff to Hash.
def method_missing method, *args
self[method.to_s]
end

e$B$3$N$;$$$Ge(B lib/net/imap.rb e$B$Ne(B starttls e$B$NCf$Ne(B

begin
# for backward compatibility
certs = options.to_str
options = create_ssl_params(certs, verify)
rescue NoMethodError
end

e$B$H$$$&%3!<%I$,A[Dj30$NF0:n$r$7$^$9e(B (options e$B$,%O%C%7%ee(B)
e$B!#e(B

net/imap.rb e$BB&$GBP=h$9$k$N$O4JC1$G$9$,!"$G$-$l$Pe(B method_missing
e$B$re(B
e$B<h$j=|$$$?J}$,$$$$$H;W$$$^$9!#e(BOpenStruct
e$B$r;H$&$h$&$K=q$-D>$9$+!"e(B
hash.foo e$B$re(B hash[“foo”]
e$B$K=q$-49$($l$P$h$$$H;W$$$^$9$,!"F0E*7?IU$1$Ne(B
Ruby [email protected]$l$,=P$=$&$G$9!#e(Brdoc
e$B$K>[email protected]$7$Fe(B
e$B$[$7$$$G$9!#e(B

Index: lib/net/imap.rb

— lib/net/imap.rb (revision 18104)
+++ lib/net/imap.rb (working copy)
@@ -333,11 +333,10 @@
def starttls(options = {}, verify = true)
send_command(“STARTTLS”) do |resp|
if resp.kind_of?(TaggedResponse) && resp.name == “OK”

  •      begin
    
  •      if options.respond_to?(:to_str)
           # for backward compatibility
           certs = options.to_str
           options = create_ssl_params(certs, verify)
    
  •      rescue NoMethodError
         end
         start_tls_session(options)
       end
    

MVM e$B$,$G$-$F!"%i%$%V%i%j$4$H$KJL$Ne(B VM

e$B$rN)$F$F%F%9%H$rAv$i$;$l$Pe(B

e$B2r7h$9$k$N$+$J!#e(B

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