mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add more test code for method visibility
This test corresponds to the first issue of #6494. Complement to #6512.
This commit is contained in:
@@ -839,6 +839,16 @@ assert('method visibility with meta programming') do
|
||||
f.call
|
||||
c.new.bad!
|
||||
end
|
||||
|
||||
assert_raise NoMethodError do
|
||||
c = Class.new {
|
||||
-> { private }.call
|
||||
def bad!
|
||||
"BAD!"
|
||||
end
|
||||
}
|
||||
c.new.bad!
|
||||
end
|
||||
end
|
||||
|
||||
assert('Module#module_function') do
|
||||
|
||||
Reference in New Issue
Block a user