29件ヒット
[1-29件を表示]
(0.272秒)
検索結果
先頭3件
-
Module
# public _ class _ method(*name) -> self (24234.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# public _ class _ method(names) -> self (24234.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
NEWS for Ruby 3
. 0 . 0 (96.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...d in singleton class definitions in methods is now a SyntaxError
instead of a warning. yield in a class definition outside of a method
is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a Run......timeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the toplevel scope is now a RuntimeError.
14541
* Assigning to a numbered parameter is now a SyntaxError instead of
a warning.
== Command line options
==......f the arguments were included in the receiver before the other modules and classes included or prepended the receiver. 9573
* Module#public, Module#protected, Module#private, Module#public_class_method, Module#private_class_method, toplevel "private" and "public" methods now accept single array...