Skip to content

Commit

Permalink
Fix the previous commit for multiple arguments
Browse files Browse the repository at this point in the history
[Fix GH-303]
  • Loading branch information
mrkn committed Jun 22, 2021
1 parent d599c29 commit a19e3f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/iruby/backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def complete(code)
def init_main_object(main)
wrapper_module = Module.new
main.extend(wrapper_module)
main.define_singleton_method(:include) do |mod|
wrapper_module.include(mod)
main.define_singleton_method(:include) do |*args, **kwargs|
wrapper_module.include(*args, **kwargs)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/iruby/backend_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_eval_one_plus_two

def test_include_module
assert_nothing_raised do
@plainbackend.eval("include Math", false)
@plainbackend.eval("include Math, Comparable", false)
end
end

Expand All @@ -34,7 +34,7 @@ def test_eval_one_plus_two

def test_include_module
assert_nothing_raised do
@prybackend.eval("include Math", false)
@prybackend.eval("include Math, Comparable", false)
end
end

Expand Down

0 comments on commit a19e3f3

Please sign in to comment.