mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@8cafaa5
This commit is contained in:
parent
1b377b32c8
commit
2e32b919b4
35 changed files with 832 additions and 10 deletions
|
@ -471,6 +471,14 @@ describe "String#split with Regexp" do
|
|||
a.should == ["Chunky", "Bacon"]
|
||||
end
|
||||
|
||||
it "yields each split substring with default pattern for a non-ASCII string" do
|
||||
a = []
|
||||
returned_object = "l'été arrive bientôt".split { |str| a << str }
|
||||
|
||||
returned_object.should == "l'été arrive bientôt"
|
||||
a.should == ["l'été", "arrive", "bientôt"]
|
||||
end
|
||||
|
||||
it "yields the string when limit is 1" do
|
||||
a = []
|
||||
returned_object = "chunky bacon".split("", 1) { |str| a << str.capitalize }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue