File.extname doesn't handle single period properly
--------------------------------------------------

                 Key: JRUBY-1017
                 URL: http://jira.codehaus.org/browse/JRUBY-1017
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0RC2
         Environment: OS X 10.4.9, Java 1.5
            Reporter: Daniel Berger
            Priority: Minor


The rule for File.extname is that a string with a single '.' (period) with 
nothing preceding it, or nothing following it, returns an empty string. These 
all fail currently:
{noformat}
assert_equal("", File.extname(".bashrc"))
assert_equal("", File.extname("."))
assert_equal("", File.extname("/."))
assert_equal("", File.extname(".."))
assert_equal("", File.extname(".foo."))
assert_equal("", File.extname("foo."))
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to