mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Fix errors in "edit_spec.rb" and "editor_spec.rb"
Basically, the condition was a bit wrong. Let's hope this commit fixes it.
This commit is contained in:
parent
08474961cc
commit
92a1b86e1e
2 changed files with 6 additions and 6 deletions
|
@ -21,10 +21,10 @@ describe "edit" do
|
||||||
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
|
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
|
||||||
# something "Temp".
|
# something "Temp".
|
||||||
@tf_dir =
|
@tf_dir =
|
||||||
if Pry::Helpers::BaseHelpers.rbx? || Pry::Helpers::BaseHelpers.jruby?
|
if Pry::Helpers::BaseHelpers.mri_19?
|
||||||
Pathname.new(Dir.tmpdir)
|
|
||||||
else
|
|
||||||
Pathname.new(Dir::Tmpname.tmpdir)
|
Pathname.new(Dir::Tmpname.tmpdir)
|
||||||
|
else
|
||||||
|
Pathname.new(Dir.tmpdir)
|
||||||
end
|
end
|
||||||
|
|
||||||
@tf_path = File.expand_path(File.join(@tf_dir.to_s, 'bar.rb'))
|
@tf_path = File.expand_path(File.join(@tf_dir.to_s, 'bar.rb'))
|
||||||
|
|
|
@ -10,10 +10,10 @@ describe Pry::Editor do
|
||||||
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
|
# OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's
|
||||||
# something "Temp".
|
# something "Temp".
|
||||||
@tf_dir =
|
@tf_dir =
|
||||||
if Pry::Helpers::BaseHelpers.rbx? || Pry::Helpers::BaseHelpers.jruby?
|
if Pry::Helpers::BaseHelpers.mri_19?
|
||||||
Pathname.new(Dir.tmpdir)
|
|
||||||
else
|
|
||||||
Pathname.new(Dir::Tmpname.tmpdir)
|
Pathname.new(Dir::Tmpname.tmpdir)
|
||||||
|
else
|
||||||
|
Pathname.new(Dir.tmpdir)
|
||||||
end
|
end
|
||||||
|
|
||||||
@tf_path = File.join(@tf_dir.to_s, 'hello world.rb')
|
@tf_path = File.join(@tf_dir.to_s, 'hello world.rb')
|
||||||
|
|
Loading…
Reference in a new issue