Modified: MacRuby/branches/experimental/spec/frozen/language/symbol_spec.rb (1156 => 1157)
--- MacRuby/branches/experimental/spec/frozen/language/symbol_spec.rb 2009-03-26 02:32:56 UTC (rev 1156)
+++ MacRuby/branches/experimental/spec/frozen/language/symbol_spec.rb 2009-03-26 03:18:03 UTC (rev 1157)
@@ -49,10 +49,20 @@
c.inspect.should == ':Foo__9'
end
- it "must not be an empty string" do
- lambda { eval ":''" }.should raise_error(SyntaxError)
+ ruby_version_is "" ... "1.9" do
+ it "must not be an empty string" do
+ lambda { eval ":''" }.should raise_error(SyntaxError)
+ end
end
+ ruby_version_is "1.9" do
+ it "can be an empty string" do
+ c = :''
+ c.class.should == Symbol
+ c.inspect.should == ':""'
+ end
+ end
+
it "can be created by the %s-delimited expression" do
a, b = :'foo bar', %s{foo bar}
b.class.should == Symbol