History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-669
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Thomas E Enebo
Reporter: Damian Steer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

Strings shouldn't have unary plus defined

Created: 06/Mar/07 03:30 PM   Updated: 06/May/07 09:49 PM
Component/s: Core Classes/Modules
Affects Version/s: JRuby 0.9.8
Fix Version/s: JRuby 1.0.0RC1

Time Tracking:
Not Specified

Environment: Java 5, OS X

Testcase included: yes


 Description  « Hide
MRI 1.8.5 does not define unary plus for strings, but jruby seems to.
require 'test/minirunit'
test_exception(NoMethodError) { +"a" }


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Damian Steer - 06/Mar/07 04:34 PM
Or maybe not. Hmm.
a="x"
+a

Raises a NoMethodError (which is not the case for a=2). "x".respond_to?('+@') is false.


Thomas E Enebo - 25/Apr/07 02:26 PM
Fixed in commit 3560

Charles Oliver Nutter - 06/May/07 09:49 PM
Closing for 1.0RC1