Project

General

Profile

Actions

Bug #762

closed

module_functionがpublicになっている

Added by rubikitch (rubikitch .) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-dev:37124]

Description

=begin
module_functionがいつのまにかpublicになっています。

= ruby19 result
RUBY_VERSION # => "1.9.0"
module Baz
module_function
def double(x) x*2 end
public_instance_methods # => [:double]
private_instance_methods # => []
end

= ruby18 result
RUBY_VERSION # => "1.8.7"
module Baz
module_function
def double(x) x*2 end
public_instance_methods # => []
private_instance_methods # => ["double"]
end
=end

Actions

Also available in: Atom PDF

Like0
Like0