別のキーワード
モジュール
- Kernel (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Application (1)
- BasicObject (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Numeric (11)
- ReFe (11)
- Ruby プログラムの実行 (11)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- Ruby用語集 (11)
- Singleton (11)
-
WIN32OLE
_ METHOD (11) -
WIN32OLE
_ PARAM (11) -
WIN32OLE
_ VARIABLE (11) - WeakRef (11)
- [] (7)
- call (14)
- cgi (11)
-
cgi
/ session (11) - coverage (7)
- debug (11)
- irb (11)
-
irb
/ completion (11) - match (22)
-
module
_ function (19) - rdoc (11)
-
rdoc
/ parser / ruby (11) -
require
_ relative (11) -
rexml
/ parsers / streamparser (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 9 feature (11) -
undef
_ method (11) -
webrick
/ cgi (11) - xmlrpc (3)
- クラス/メソッドの定義 (11)
- 制御構造 (11)
検索結果
先頭5件
-
Method
# ===(*args) -> object (39112.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...せん。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......せん。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f......ありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called w... -
Method (38094.0)
-
Object#method によりオブジェクト化され たメソッドオブジェクトのクラスです。
...ject#method によりオブジェクト化され
たメソッドオブジェクトのクラスです。
メソッドの実体(名前でなく)とレシーバの組を封入します。
Proc オブジェクトと違ってコンテキストを保持しません。
=== Proc との差
Method は......は使い捨てに向き、Method は何度も繰り返し生成する
場合に向くと言えます。また内包するコードの大きさという点では
Proc は小規模、Method は大規模コードに向くと言えます。
既存のメソッドを Method オブジェクト化する......。
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo)
p m # => #<Method: Foo#foo>
p m.call(1) # => "foo called with arg 1"
//}
名前のないメソッド(の代わり)が必要なら Proc を使うと良い。
//em... -
Method
# [](*args) -> object (24012.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...せん。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......せん。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f......ありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called w... -
Method
# call(*args) -> object (24012.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...せん。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......せん。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f......ありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called w... -
Method
# call(*args) { . . . } -> object (24012.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...せん。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called with arg 2"
//}......せん。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "f......ありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m[1] # => "foo called with arg 1"
m.call(2) # => "foo called w... -
Module
# undef _ method(*name) -> self (6143.0) -
このモジュールのインスタンスメソッド name を未定義にします。
...か Symbol を指定します。
@raise NameError 指定したインスタンスメソッドが定義されていない場合に発生します。
=== 「未定義にする」とは
このモジュールのインスタンスに対して name という
メソッドを呼び出すことを禁止す......k
puts 'B'
end
end
B.new.ok # => B
# undef_method の場合はスーパークラスに同名のメソッドがあっても
# その呼び出しはエラーになる
class B
undef_method :ok
end
B.new.ok # => NameError
# remove_method の場合はスーパークラスに同名のメソ......ass B
remove_method :ok
end
B.new.ok # => A
//}
また、undef 文と undef_method の違いは、
メソッド名を String または Symbol で与えられることです。
//emlist[例][ruby]{
module M1
def foo
end
def self.moo
undef foo
end
end
M1.instance_methods false #=> ["... -
WIN32OLE
_ METHOD (6060.0) -
OLEオートメーションサーバが持つメソッドの情報を提供します。
..._METHODは、WIN32OLE#ole_methodsなどの呼び出しによって返さ
れるオブジェクトで、OLEオートメーションサーバのメソッドの情報(メタデー
タ)を保持します。
=== サンプルコード
excel = WIN32OLE.new('Excel.Application')
excel.ole_methods......|method|
if method.visible?
puts <<SIGNATURE
#{method.return_type} #{method.name}(#{
method.params.map {|p| "#{p.ole_type} #{p.name}"}.join(', ')
}) : #{method.helpstring}
SIGNATURE
end
end
@see WIN32OLE#ole_methods, WIN32OLE#ole_func_methods, WIN32OLE#ole_get_methods,......WIN32OLE#ole_put_methods, WIN32OLE#ole_method, WIN32OLE#ole_method_help, WIN32OLE_PARAM... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (660.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...ことを意味する
ようになります。((<ruby-dev:20358>))
: defined? [compat]
属性代入、配列要素への代入に対して "method" でなく "assignment" を返
すようになりました。
: ((<リテラル/数値リテラル>)) [compat]
10進((*整数*))リテラル......ていればそれを実行し、その結果をブロックとして渡すようになりまし
た。以前は、& 修飾できるのは Proc, Method オブジェクト限定でした。
これに伴い Proc#to_proc が追加されました。
: 終了ステータス [compat]
raise SystemE......$! と rescue 節の例外クラスとは ((<Module#===|Module/===>))
を使って比較するようになりました。
以前は kind_of? による比較なので基本的な動作に変わりはありませんが、
SystemCallError.=== は特別に errno が一致する例外を同じと... -
ruby 1
. 9 feature (546.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...追加
== 1.9.0
=== 2006-09-16
: Struct#inspect
=== 2006-09-14
: digest.rb
: Digest::Base.file
=== 2006-09-13
: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?
=== 2006-09-12
: Hash#compare_by_identity
: Hash#compare_by_identity?
=== 2006-09-11
: Ha......sh#identical
: Hash#identical?
=== 2006-08-31
: Array#shuffle
: Array#shuffle!
追加
=== 2006-07-26
: __send
: __send!
追加
: invoke_method
: invoke_functional_method
削除
=== 2006-07-21
: Module#attr
オプショナル引数の assignable がなくなり、attr_reader 相当......ました
[RCR#331]
=== 2006-06-22
: Module#name
無名モジュールに対しては nil を返すようになりました
[ruby-talk:198440]
=== 2006-06-17
: BasicObject#invoke_method
: BasicObject#invoke_functional_method
追加
((<ruby-talk:197512>))
=== 2006-06-13
: IPsocket
:... -
ruby 1
. 8 . 3 feature (354.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...http://dev.ctor.org/soap4r/wiki/Changes-154>))
* ((<URL:http://dev.ctor.org/soap4r/wiki/Changes-155>))
== 1.8.2 (2004-12-25) -> 1.8.3 (2005-09-21)
=== 2005-09-19
: FileUtils.remove_entry_secure [lib] [new]
: FileUtils.remove_entry [lib] [new]
: FileUtils.chmod_R [lib] [new]
: F......eUtils.options [lib] [new]
: FileUtils.have_option? [lib] [new]
: FileUtils.options_of [lib] [new]
: FileUtils.collect_method [lib] [new]
追加。
: FileUtils.rm_r [lib] [compat]
: FileUtils.rm_rf [lib] [compat]
: FileUtils.cd [lib] [compat]
: FileUtils.cp_r......
=== 2005-09-16
: File.join [ruby] [compat]
型チェックを厳密にするようになりました。
$ ruby-1.8.2 -e 'p File.join(1, 2)'
"1/2"
$ ruby-1.8.3 -e 'p File.join(1, 2)'
-e:1:in `join': can't convert Fixnum into String (TypeError)
from -e:1
=== 200... -
ruby 1
. 8 . 2 feature (348.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...82>))
を参照して下さい。
* rss, rdoc, yaml の変更点は収録していません。
=== 日時未詳
: CGI#server_port [lib] [bug]
常に 0 を返すバグが修正されました。
=== 2004-12-19
: OpenSSL::X509::Store#time= [lib] [new]
: OpenSSL::X509::StoreContext#ti......at.
: OpenSSL::X509::Name.parse_rfc2253 [lib] [new]
new method to parse RFC2253 DN format.
=== 2004-12-18
: Object#id [ruby] [obsolete]
常に警告がでるようになりました。Object#object_id を使って下さい。
=== 2004-12-17
: CGI::Session#initialize [lib] [compat]
'no_h......idden' オプションを指定できるようになりました。((<ruby-talk:123850>))
=== 2004-12-16
: Hash#eql? [ruby] [obsolete]
: Hash#hash [ruby] [obsolete]
削除
((<ruby-dev:25206>))?
=== 2004-12-14
: CGI::Session.initialize [lib] [change]
存在しないセッション ID がク...