るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.107秒)
トップページ > クエリ:-[x] > クエリ:Ruby[x] > クエリ:end[x] > クエリ:method_removed[x]

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. rexml end_element

検索結果

Module#method_removed(name) -> () (18237.0)

メソッドが Module#remove_method により削除 された時にインタプリタがこのメソッドを呼び出します。

...icObject#singleton_method_removed
を使います。

@param name 削除されたメソッド名が Symbol で渡されます。

//emlist[例][ruby]{
class Foo
def Foo.method_removed(name)
puts "method \"#{name}\" was removed"
end


def foo
end

remove_method :foo
end


# => method "foo"...

BasicObject#singleton_method_removed(name) -> object (6249.0)

特異メソッドが Module#remove_method に より削除された時にインタプリタから呼び出されます。

...には
Module#method_removedを使います。

@param name 削除されたメソッド名が Symbol で渡されます。

//emlist[例][ruby]{
class Foo
def singleton_method_removed(name)
puts "singleton method \"#{name}\" was removed"
end

end


obj = Foo.new
def obj.foo
end


class << obj...
...remove_method :foo
end


#=> singleton method "foo" was removed
//}

@see Module#method_removed,BasicObject#singleton_method_added,BasicObject#singleton_method_undefined...

1.6.8から1.8.0への変更点(まとめ) (4794.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への変更点(まとめ)/サポートプラットフォームの追加>))

...動作はなくなりました)

$defout や $deferr に代入を行うと警告がでます。
(注:1.6 に $deferr はありません)
((<ruby-dev:20961>))

$stdin にオブジェクトを代入すると標準入力からの入力メソッド(gets 等)
はそのオブジェクトにメ...
...と定義されました
((<ruby-bugs-ja:313>))。なんだかよくわかりません(^^;

class << Object
p [self.id, self]
class << self
p [self.id, self]
end

end

=> ruby 1.6.7 (2002-03-01) [i586-linux]
[537771634, Cla...
...: ((<Module#include?|Module/include?>)) [new]

Added. ((<ruby-dev:13941>))

: ((<Module#included|Module/included>)) [new]

追加。Module#append_feature の後に呼ばれるhook

: ((<Module#method_removed|Module/method_removed>)) [new]
: ((<Module#method_undefined|Module/method_unde...

BasicObject#singleton_method_undefined(name) -> object (142.0)

特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。

...が Symbol で渡されます。

//emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)
puts "singleton method \"#{name}\" was undefined"
end

end


obj = Foo.new
def obj.foo
end

def obj.bar
end


class << obj
undef_method :foo
end

obj.instance_eval {undef bar}

#=> singleton me...
...thod "foo" was undefined
# singleton method "bar" was undefined
//}

@see Module#method_undefined,BasicObject#singleton_method_added,BasicObject#singleton_method_removed , d:spec/def#undef...

BasicObject#singleton_method_added(name) -> object (130.0)

特異メソッドが追加された時にインタプリタから呼び出されます。

...ます。

//emlist[例][ruby]{
class Foo
def singleton_method_added(name)
puts "singleton method \"#{name}\" was added"
end

end


obj = Foo.new
def obj.foo
end


#=> singleton method "foo" was added
//}

@see Module#method_added,BasicObject#singleton_method_removed,BasicObject#singleton_metho...

絞り込み条件を変える