mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix version guard in __dir__ spec
This commit is contained in:
parent
534536c7cc
commit
0ad0e63887
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ describe "Kernel#__dir__" do
|
|||
end
|
||||
end
|
||||
|
||||
ruby_version_is ""..."2.7" do
|
||||
ruby_version_is ""..."2.8" do
|
||||
context "when used in eval with top level binding" do
|
||||
it "returns the real name of the directory containing the currently-executing file" do
|
||||
eval("__dir__", binding).should == File.realpath(File.dirname(__FILE__))
|
||||
|
@ -20,7 +20,7 @@ describe "Kernel#__dir__" do
|
|||
end
|
||||
end
|
||||
|
||||
ruby_version_is "2.7" do
|
||||
ruby_version_is "2.8" do
|
||||
context "when used in eval with top level binding" do
|
||||
it "returns nil" do
|
||||
eval("__dir__", binding).should == nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue