1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Fix rubocop warnings

This commit is contained in:
André Luis Leal Cardoso Junior 2022-04-09 17:27:24 -03:00
parent 4e3fddc490
commit 4daa24ded5
2 changed files with 7 additions and 5 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
task :test_task do task :test_task do
binding binding
end end

View file

@ -216,7 +216,7 @@ describe Pry::Method do
base.send :alias_method, "respond_to?", "respond_to_with_variables?" base.send :alias_method, "respond_to?", "respond_to_with_variables?"
end end
def respond_to_with_variables?(sym, include_priv=false) def respond_to_with_variables?(sym, include_priv = false)
respond_to_without_variables?(sym, include_priv) respond_to_without_variables?(sym, include_priv)
end end
end end
@ -229,13 +229,13 @@ describe Pry::Method do
@tasks[name] = block @tasks[name] = block
end end
def load def load_task
path = File.expand_path("../fixtures/test_task.rb", __FILE__) path = File.expand_path("fixtures/test_task.rb", __dir__)
instance_eval File.read(path), path instance_eval File.read(path), path
end end
end end
o.load o.load_task
o2 = Object.new o2 = Object.new
o2.singleton_class.send(:include, included_module) o2.singleton_class.send(:include, included_module)
@ -244,7 +244,7 @@ describe Pry::Method do
expect(o2.method(:respond_to_without_variables?).source_location).to be_nil expect(o2.method(:respond_to_without_variables?).source_location).to be_nil
b = o2.instance_eval(&o.tasks[:test_task]) b = o2.instance_eval(&o.tasks[:test_task])
expect(Pry::Method.from_binding(b).name).to eq "load" expect(Pry::Method.from_binding(b).name).to eq "load_task"
end end
end end