String#[]= should raise an IndexError if string index not found
---------------------------------------------------------------

                 Key: JRUBY-2341
                 URL: http://jira.codehaus.org/browse/JRUBY-2341
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC3
         Environment: Windows XP, Java 1.6, JRuby 1.1 (March 28th release)
            Reporter: Daniel Berger


When using a string index for String#[]=, the index must match the receiver or 
an IndexError should be raised:
{noformat}
C:\>irb
irb(main):001:0> 'hello'['x'] = 'y'
IndexError: string not matched
        from (irb):1:in `[]='
        from (irb):1
irb(main):002:0> quit

C:\>jirb
irb(main):001:0> 'hello'['x'] = 'y'
=> "y"
{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