Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1
-
Fix Version/s: JRuby 1.1.3
-
Component/s: None
-
Labels:None
-
Environment:MAC OSX Leopard, JDK 1.5.0_13, JRUBY 1.1, ruby 1.8.6 (2008-04-18 rev 6423) [i386-jruby1.1+]
-
Testcase included:yes
-
Number of attachments :
Description
I have a simple YML file that I am trying to load that contains asterisks. It works fine in Ruby 1.8.6, but if I try and load it with JRuby I get the following exception with that test case.
ScannerException while scanning an alias we had this expected alphabetic or numeric character, but found something else...
Please see the attached files that run the test and the two example yml files, one that contains asterisks and another that does not.
bernie:jrubytest justin$ ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.9.1]
bernie:jrubytest justin$ spec load.rb
..
Finished in 0.006037 seconds
2 examples, 0 failures
bernie:jrubytest justin$ jruby -v
ruby 1.8.6 (2008-04-18 rev 6423) [i386-jruby1.1+]
bernie:jrubytest justin$ jruby -S spec load.rb
F.
1)
ArgumentError in 'when first created tries to parse a YML file with asterisks successfully'
ScannerException while scanning an alias we had this expected alphabetic or numeric character, but found something else...
Finished in 0.133 seconds
2 examples, 1 failure
There's obviously a difference between Syck and JvYAML in the way they handle the asterisk character. Until the matter is resolved, you can work around this issue by enclosing the *.rb in quotes or double-quotes. Both YAML engines should handle that properly.