[macruby-changes] [1688] MacRuby/branches/experimental/spec/frozen
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jun 1 15:49:00 PDT 2009
Revision: 1688
http://trac.macosforge.org/projects/ruby/changeset/1688
Author: eloy.de.enige at gmail.com
Date: 2009-06-01 15:48:59 -0700 (Mon, 01 Jun 2009)
Log Message:
-----------
Updated RubySpec to 2f319ffb5dbeed2f79c7a4a4747f749fe7e48426
Modified Paths:
--------------
MacRuby/branches/experimental/spec/frozen/core/string/index_spec.rb
MacRuby/branches/experimental/spec/frozen/core/string/shared/to_sym.rb
MacRuby/branches/experimental/spec/frozen/core/string/slice_spec_disabled.rb
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/squeeze_tags.txt
MacRuby/branches/experimental/spec/frozen/upstream
Removed Paths:
-------------
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/entries_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/index_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/initialize_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/rindex_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/slice_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_a_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_sym_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upcase_tags.txt
MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upto_tags.txt
Modified: MacRuby/branches/experimental/spec/frozen/core/string/index_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/string/index_spec.rb 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/core/string/index_spec.rb 2009-06-01 22:48:59 UTC (rev 1688)
@@ -212,23 +212,27 @@
end
describe "String#index with Regexp" do
- it "behaves the same as String#index(string) for escaped string regexps" do
- ["blablabla", "hello cruel world...!"].each do |str|
- ["", "b", "bla", "lab", "o c", "d."].each do |needle|
- regexp = Regexp.new(Regexp.escape(needle))
- str.index(regexp).should == str.index(needle)
-
- 0.upto(str.size + 1) do |start|
- str.index(regexp, start).should == str.index(needle, start)
+ # This test fails on 1.9.2 because it handles empty regexps wrongly, i.e.
+ # when the regexp is //, the expectation isn't met.
+ ruby_bug "#1553", "1.9.2" do
+ it "behaves the same as String#index(string) for escaped string regexps" do
+ ["blablabla", "hello cruel world...!"].each do |str|
+ ["", "b", "bla", "lab", "o c", "d."].each do |needle|
+ regexp = Regexp.new(Regexp.escape(needle))
+ str.index(regexp).should == str.index(needle)
+
+ 0.upto(str.size + 1) do |start|
+ str.index(regexp, start).should == str.index(needle, start)
+ end
+
+ (-str.size - 1).upto(-1) do |start|
+ str.index(regexp, start).should == str.index(needle, start)
+ end
end
-
- (-str.size - 1).upto(-1) do |start|
- str.index(regexp, start).should == str.index(needle, start)
- end
end
end
end
-
+
it "returns the index of the first match of regexp" do
"blablabla".index(/bla/).should == 0
"blablabla".index(/BLA/i).should == 0
@@ -308,6 +312,12 @@
"blaxbla".index(/..x/, 2).should == nil
end
+ ruby_bug "#1553", "1.9.2" do
+ it "returns nil if the Regexp matches the empty string and the offset is out of range" do
+ "ruby".index(//,12).should be_nil
+ end
+ end
+
it "supports \\G which matches at the given start offset" do
"helloYOU.".index(/\GYOU/, 5).should == 5
"helloYOU.".index(/\GYOU/).should == nil
Modified: MacRuby/branches/experimental/spec/frozen/core/string/shared/to_sym.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/string/shared/to_sym.rb 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/core/string/shared/to_sym.rb 2009-06-01 22:48:59 UTC (rev 1688)
@@ -7,8 +7,10 @@
"abc=".send(@method).should == :abc=
end
- it "raises an ArgumentError when self can't be converted to symbol" do
- lambda { "".send(@method) }.should raise_error(ArgumentError)
- lambda { "foo\x00bar".send(@method) }.should raise_error(ArgumentError)
+ ruby_version_is ""..."1.9" do
+ it "raises an ArgumentError when self can't be converted to symbol" do
+ lambda { "".send(@method) }.should raise_error(ArgumentError)
+ lambda { "foo\x00bar".send(@method) }.should raise_error(ArgumentError)
+ end
end
end
Modified: MacRuby/branches/experimental/spec/frozen/core/string/slice_spec_disabled.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/string/slice_spec_disabled.rb 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/core/string/slice_spec_disabled.rb 2009-06-01 22:48:59 UTC (rev 1688)
@@ -523,7 +523,7 @@
lambda { "hello hello".freeze.slice!('llo') }.should raise_error(RuntimeError)
end
- ruby_bug "#1551" do
+ ruby_bug "#1551", "1.9" do
it "doesn't raise a RuntimeError if self is frozen but self does not contain other" do
"this is a string".freeze.slice!('zzz').should == nil
end
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/entries_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/entries_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/entries_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,2 +0,0 @@
-fails:String#entries returns an empty array for empty strings
-fails:String#entries returns an array containing the string for non-empty strings
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/index_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/index_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/index_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,4 +0,0 @@
-fails:String#index with Fixnum character values over 255 (256th ASCII character) always result in nil
-fails:String#index with Fixnum negative character values always result in nil
-fails:String#index with Fixnum returns nil if the character isn't found
-fails:String#index with Regexp behaves the same as String#index(string) for escaped string regexps
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/initialize_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/initialize_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/initialize_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,2 +0,0 @@
-fails:String#initialize is a private method
-fails:String#initialize raises a TypeError if self is frozen
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/rindex_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/rindex_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/rindex_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,2 +0,0 @@
-fails:String#rindex with Fixnum doesn't use fixnum % 256
-fails:String#rindex with Fixnum returns nil if the character isn't found
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/slice_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/slice_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/slice_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,14 +0,0 @@
-fails:String#slice! with index raises a TypeError if self is frozen
-fails:String#slice! with index doesn't raise a TypeError if self is frozen and idx is outside of self
-fails:String#slice! with index, length raises a TypeError if self is frozen
-fails:String#slice! with index, length doesn't raise a TypeError if self is frozen but the given position is out of self
-fails:String#slice! with index, length doesn't raise a TypeError if self is frozen but length is negative
-fails:String#slice! Range raises a TypeError if self is frozen
-fails:String#slice! Range doesn't raise a TypeError if self is frozen but the given range is out of self
-fails:String#slice! with Regexp raises a TypeError if self is frozen
-fails:String#slice! with Regexp doesn't raise a TypeError if self is frozen but there is no match
-fails:String#slice! with Regexp, index raises a TypeError if self is frozen
-fails:String#slice! with Regexp, index doesn't raise a TypeError if self is frozen but there is no match
-fails:String#slice! with Regexp, index doesn't raise a TypeError if self is frozen but there is no capture for idx
-fails:String#slice! with String raises a TypeError if self is frozen
-fails:String#slice! with String doesn't raise a TypeError if self is frozen but self does not contain other
Modified: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/squeeze_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/squeeze_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/squeeze_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,2 +1 @@
fails:String#squeeze raises a TypeError when one set arg can't be converted to a string
-fails:String#squeeze! raises a TypeError when self is frozen
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_a_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_a_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_a_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,2 +0,0 @@
-fails:String#to_a returns an empty array for empty strings
-fails:String#to_a returns an array containing the string for non-empty strings
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_sym_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_sym_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/to_sym_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1 +0,0 @@
-fails:String#to_sym raises an ArgumentError when self can't be converted to symbol
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upcase_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upcase_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upcase_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1 +0,0 @@
-fails:String#upcase! raises a TypeError when self is frozen
Deleted: MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upto_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upto_tags.txt 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/tags/1.9/core/string/upto_tags.txt 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1,3 +0,0 @@
-fails:String#upto stops iterating as soon as the current value's character count gets higher than stop's
-fails:String#upto raises a TypeError if other can't be converted to a string
-fails:String#upto raises a LocalJumpError if other is a string but no block was given
Modified: MacRuby/branches/experimental/spec/frozen/upstream
===================================================================
--- MacRuby/branches/experimental/spec/frozen/upstream 2009-06-01 20:50:49 UTC (rev 1687)
+++ MacRuby/branches/experimental/spec/frozen/upstream 2009-06-01 22:48:59 UTC (rev 1688)
@@ -1 +1 @@
-5d6614b032b1ca4c1e27c9176219628723f3485a
\ No newline at end of file
+2f319ffb5dbeed2f79c7a4a4747f749fe7e48426
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090601/5d4f209c/attachment-0001.html>
More information about the macruby-changes
mailing list