[MacRuby] #853: File.extname('.....x') should return "".

MacRuby ruby-noreply at macosforge.org
Tue Aug 17 05:02:45 PDT 2010


#853: File.extname('.....x') should return "".
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 $ cat test_extname.rb
 p File.extname('test.rb')   # => ".rb"
 p File.extname('.emacs.el') # => ".el"
 p File.extname('.profile')  # => ""
 p File.extname('.x')        # => ""
 p File.extname('..x')       # => ""
 p File.extname('.....x')    # => ""
 p File.extname('..profile') # => ""
 }}}

 Result of Ruby 1.9.1:
 {{{
 $ ruby test_extname.rb
 ".rb"
 ".el"
 ""
 ""
 ""
 ""
 ""
 }}}

 Result of MacRuby Trunk:
 {{{
 $ DYLD_LIBRARY_PATH=. ./macruby -I./lib test_extname.rb
 ".rb"
 ".el"
 ""
 ""
 ".x"
 ".x"
 ".profile"
 }}}

 I merged rb_file_s_extname() from Ruby 1.9 to add a necessary codes.[[BR]]
 I atach a patch file.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/853>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list