[MacRuby-devel] [MacRuby] #452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby

MacRuby ruby-noreply at macosforge.org
Wed Nov 25 01:15:50 PST 2009


#452: Segmentation Fault tracing back to openssl.bundle when authenticating with
gcal4ruby
--------------------------------+-------------------------------------------
 Reporter:  dweinric@…          |        Owner:  lsansonetti@…        
     Type:  defect              |       Status:  closed               
 Priority:  major               |    Milestone:  MacRuby 0.5          
Component:  MacRuby             |   Resolution:  fixed                
 Keywords:                      |  
--------------------------------+-------------------------------------------

Comment(by lsansonetti@…):

 With r3051, this now fails as expected.

 {{{
 $ macruby -r rubygems -e "require 'gcal4ruby';
 service=GCal4Ruby::Service.new;
 service.authenticate('<user>@gmail.com','<password>')"
 core:in `raise:': Error=BadAuthentication
  (GCal4Ruby::HTTPPostFailed)
         from
 /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/base.rb:113:in
 `send_post:'
         from
 /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:43:in
 `authenticate:'
 }}}

 When I do pass my gmail account information, it fails differently:

 {{{
 /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:42:in
 `authenticate:': undefined method `to_a' for
 #<NSMutableString:0x2005a5020> (NoMethodError)
 }}}

 Looking at line 43 of gcal4ruby/service.rb:

 {{{
       @auth_token = ret.read_body.to_a[2].gsub("Auth=", "").strip
 }}}

 #read_body (defined in net/http) is supposed to return a String, I
 believe. String#to_a is not defined anymore in 1.9. I believe this is a
 1.8 vs 1.9 issue (but I'm not sure). Let me know if you find anything.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/452#comment:3>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list