1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-12-27 16:12:47 +00:00
parent 0f989b87a0
commit a34db218ad
162 changed files with 1267 additions and 621 deletions

View file

@ -543,16 +543,12 @@ describe "The defined? keyword for variables" do
defined?($+).should be_nil
end
it "returns nil for $1-$9" do
it "returns nil for any last match global" do
defined?($1).should be_nil
defined?($2).should be_nil
defined?($3).should be_nil
defined?($4).should be_nil
defined?($5).should be_nil
defined?($6).should be_nil
defined?($7).should be_nil
defined?($8).should be_nil
defined?($9).should be_nil
defined?($10).should be_nil
defined?($200).should be_nil
end
end
@ -587,13 +583,10 @@ describe "The defined? keyword for variables" do
end
it "returns nil for non-captures" do
defined?($3).should be_nil
defined?($4).should be_nil
defined?($5).should be_nil
defined?($6).should be_nil
defined?($7).should be_nil
defined?($8).should be_nil
defined?($9).should be_nil
defined?($10).should be_nil
defined?($200).should be_nil
end
end
@ -622,16 +615,12 @@ describe "The defined? keyword for variables" do
defined?($+).should be_nil
end
it "returns nil for $1-$9" do
it "returns nil for any last match global" do
defined?($1).should be_nil
defined?($2).should be_nil
defined?($3).should be_nil
defined?($4).should be_nil
defined?($5).should be_nil
defined?($6).should be_nil
defined?($7).should be_nil
defined?($8).should be_nil
defined?($9).should be_nil
defined?($10).should be_nil
defined?($200).should be_nil
end
end
@ -666,13 +655,10 @@ describe "The defined? keyword for variables" do
end
it "returns nil for non-captures" do
defined?($3).should be_nil
defined?($4).should be_nil
defined?($5).should be_nil
defined?($6).should be_nil
defined?($7).should be_nil
defined?($8).should be_nil
defined?($9).should be_nil
defined?($10).should be_nil
defined?($200).should be_nil
end
end
it "returns 'global-variable' for a global variable that has been assigned" do