Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6RC1
-
Fix Version/s: JRuby 1.6RC2
-
Component/s: Intro, Ruby 1.9.2
-
Labels:None
-
Environment:jruby 1.6.0.RC1 (ruby 1.9.2 trunk 136) (2011-01-10 769f847) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]
-
Testcase included:yes
-
Number of attachments :
Description
When both the #to_a and #to_s methods are defined on an object in an array which #join is called on, #to_a is used instead of #to_s for determining the string value of the object which is joined. The return value of the #to_a call also seems to be flattened with the containing array before the join is applied.
This is causing a problem with url slug generation of Mongoid documents in rails 3.
A test/unit testcase for this issue is attached. This issue only occurs when enabling 1.9 support with --1.9. This test passes on MRI 1.9.2 and JRuby 1.6RC1 --1.8.
Marked as "Intro" since it's pretty easy to fix.