Projects

Ticket #204: 204.2.rb

File 204.2.rb, 429 bytes (added by emil@…, 18 months ago)

reduction

Line 
1module NonKernel
2  private
3  def foo; end
4end
5
6class A
7  include NonKernel
8end
9p A.private_instance_methods.grep(/puts|foo/)
10p A.public_instance_methods.grep(/puts|foo/)
11
12class A
13  def puts
14  end
15 
16  def foo
17  end
18end
19
20p A.private_instance_methods.grep(/puts|foo/)
21p A.public_instance_methods.grep(/puts|foo/)
22
23=begin
24
25displays:
26
27  [:puts]
28  []
29  [:puts]
30  [:puts]
31
32instead of: (Ruby 1.9.2)
33
34  [:puts]
35  []
36  []
37  [:puts]
38
39=end