[MacRuby] #1012: Inconsistent Regex behaviour

MacRuby ruby-noreply at macosforge.org
Fri Nov 26 01:06:18 PST 2010


#1012: Inconsistent Regex behaviour
-------------------------------------------+--------------------------------
 Reporter:  harry@…                        |       Owner:  lsansonetti@…        
     Type:  defect                         |      Status:  new                  
 Priority:  minor                          |   Milestone:                       
Component:  MacRuby                        |    Keywords:                       
-------------------------------------------+--------------------------------
Description changed by martinlagardette@…:

Old description:

> I've been trying to use Ruby's built in Net::IMAP but haven't got beyond
> the first hurdle.
>
> require 'net/imap'
> imap = Net::IMAP.new("imap.gmail.com", 25, false) // crashes with 'can't
> convert nil into String (TypeError)'
>
> I've traced it to an inconsistency in the Regex handling between vanilla
> Ruby and MacRuby (tested on the latest nightly build of 0.8 as of the
> 25th of November):
>
> $ macruby --version
> MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64]
> $ macruby regex-test.rb
> 0 '220'
>
> versus
>
> $ ruby --version
> ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
> $ ruby regex-test.rb
> 0 '220'
> 3 ' '
> 4 'mx.google.com'
> 17 ' '
> 18 'ESMTP'
> 23 ' '
> 24 'n40sm3793094weq.29'

New description:

 I've been trying to use Ruby's built in Net::IMAP but haven't got beyond
 the first hurdle.

 {{{
 #!ruby
 require 'net/imap'
 imap = Net::IMAP.new("imap.gmail.com", 25, false) # crashes with 'can't
 convert nil into String (TypeError)'
 }}}

 I've traced it to an inconsistency in the Regex handling between vanilla
 Ruby and MacRuby (tested on the latest nightly build of 0.8 as of the 25th
 of November):

 {{{
 $ macruby --version
 MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64]
 $ macruby regex-test.rb
 0 '220'
 }}}
 versus
 {{{
 $ ruby --version
 ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
 $ ruby regex-test.rb
 0 '220'
 3 ' '
 4 'mx.google.com'
 17 ' '
 18 'ESMTP'
 23 ' '
 24 'n40sm3793094weq.29'
 }}}

--

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



More information about the macruby-tickets mailing list