るりまサーチ

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

検索結果

TracePoint#inspect -> String (18135.0)

self の状態を人間に読みやすい文字列にして返します。

...
self
の状態を人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.inspect # "#<TracePoint:call `foo'@/path/to/test.rb:1>"
end
trace.enable
foo 1
//}...

UnboundMethod#bind_call(recv, *args) -> object (6148.0)

self を recv に bind して args を引数として呼び出します。

...
self
を recv に bind して args を引数として呼び出します。

self
.bind(recv).call(*args) と同じ意味です。

//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}

@see UnboundMethod#bind, Method#call...

UnboundMethod#bind_call(recv, *args) { ... } -> object (6148.0)

self を recv に bind して args を引数として呼び出します。

...
self
を recv に bind して args を引数として呼び出します。

self
.bind(recv).call(*args) と同じ意味です。

//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}

@see UnboundMethod#bind, Method#call...

1.6.8から1.8.0への変更点(まとめ) (198.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-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, Class]...
...クがゆるい。break が例外になる。

Proc.new {|a,b,c| p [a,b,c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-linux]...
...ス/メソッド(互換性のある変更)

=== 組み込み関数

: ((<組み込み関数/sprintf>)) [new]

"%p" が追加されました。inspect の結果が利用されます。((<RCR#69>))

: ((<組み込み関数/trap>)) [compat]

あるシグナルに対して、SIG_DFL や SIG_IGN...

ruby 1.6 feature (144.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...; make sure
ruby 1.6.7 (2002-05-04) [i586-linux]
"\\t"
nil

: 2002-04-20: Regexp#inspect

/x フラグ付きの正規表現オブジェクトの inspect が改行を \n に変換して
いました。((<ruby-bugs-ja:PR#225>))

p /a
b/x...
...の戻り値

以下のメソッドの戻り値が正しくなりました。((<ruby-bugs-ja:PR#205>))

* ((<Enumerable/each_with_index>)) が self を返すようになった(以前は nil)
* ((<Process/Process.setpgrp>)) が返す値が不定だった。
* ((<String/ljust>)), ((<String/rju...
...-:9: warning: p (...) interpreted as method call
ruby 1.6.5 (2001-09-19) [i586-linux]
Bar
[1, 2, 3]
Bar
Array
Array
Array
=> -:9: warning: p (...) interpreted as method call
ruby 1.6.5 (2001-10-05) [i586-...

絞り込み条件を変える

ruby 1.8.4 feature (132.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...)
* ((<ruby 1.8.4 feature/mkmf: find_executable() [compat]>))
* ((<ruby 1.8.4 feature/拡張ライブラリAPI>))
* ((<ruby 1.8.4 feature/rb_funcall2() [bug]>))
* ((<ruby 1.8.4 feature/rb_respond_to() [change]>))
* ((<ruby 1.8.4 feature/rb_obj_respond_to() [new]>))
* ((<ruby 1.8.4 feature/...
...-:1: empty symbol literal

: Symbol [bug]

#Sat Oct 22 13:26:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check
# if valid as a symbol name more strictly. [ruby-dev:27478]
#
# * test/ruby/test_sym...
...def initialize
Foo.instance_method(:initialize).bind(self).call
end
end

Bar.new

# => ruby 1.8.3 (2005-09-21) [i686-linux]
-:3:in `initialize': method `initialize' called on terminated object (0xb7dd2bec) (NotImplementedError)...

クラス/メソッドの定義 (108.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...ークラスを指定するとエラー
class Foo < String
end
# => superclass mismatch for class Foo (TypeError)
//}

クラス定義式の中は self がそのクラスであることと、
limitのデフォルトが異なること以外
にトップレベルとの違いはありません。クラ...
...れる機能です。
このような引数は 1 つしか作れません。

//emlist[例][ruby]{
def foo(x, *xs)
puts "#{x} : #{xs.inspect}" # Object#inspect は p のような詳細な内部表示
end
foo(1) #=> 1 : []
foo(1, 2) #=> 1 : [2]
foo(1, 2, 3) #=> 1 : [2, 3]

def bar(x,...
...合のブロック引数の値はnilです。

//emlist[例][ruby]{
def foo(cnt, &block_arg)
cnt.times { block_arg.call } # ブロックに収まったProcオブジェクトはcallで実行
end
foo(3) { print "Ruby! " } #=> Ruby! Ruby! Ruby!
//}

メソッド定義において、仮引数はその...

NEWS for Ruby 2.7.0 (60.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...うな場所にコメントを書けるようになりました。

//emlist[][ruby]{
foo
# .bar
.baz # => foo.baz
//}

* リテラルの「self」をレシーバーとしたプライベートメソッド呼び出しが
できるようになりました。 11297 16123

* 多重代入で...
...4] #=> 0b0011
0b01001100[2..5] #=> 0b0011
0b01001100[2...6] #=> 0b0011
# ^^^^
//}

* Method
* 変更されたメソッド
* Method#inspectで出てくる情報が増えました。 14145

* Module
* 新規メソッド
* 定数が定義された場所を取得するModule#...
...Time#inspectがTime#to_sから分離されて、秒未満も
含まれるようになりました。 15958

* UnboundMethod
* 新規メソッド
* UnboundMethod#bind_callが追加されました。 15955
* 「umethod.bind_call(obj, ...)」は「umethod.bind(obj).call(...)...

ruby 1.9 feature (54.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...[obsolete]: 廃止された(される予定の)機能
* [platform]: 対応プラットフォームの追加

== 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#...
...lk:197512>))

=== 2006-06-13

: IPsocket
: TCPsocket
: SOCKSsocket
: TCPserver
: UDPsocket
: UNIXsocket
: UNIXserver

削除

=== 2006-06-11

: __callee__ [new]
: __method__ [new]

((<URL:http://www.dm4lab.to/~usa/ruby/d/200606a.html#id20060610_P1_7>))

: Symbol#to_proc

=== 2006-06-10

* 新機...
...グが修正されました ((<ruby-core:07928>))
: エラー表示で、true/false/nil が self の場合の表示が変わりました
: UnboundMethod#bind で生成したものでも Method#inspect でちゃんとなるようになりました ((<ruby-dev:28636>))
: 丸めエラー修正 ((...

NEWS for Ruby 2.5.0 (30.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...rnel
* Object#yield_self を追加 6721
* Kernel.#pp をrequireなしで使えるようにしました 14123
* Kernel.#warn :uplevel というキーワード引数を追加しました 12882

* Method
* Method#=== は Proc#===と同じようにMethod#callを呼び出します 14...
...ions when comparing begin and
end with #<=> and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688

* Regexp
* Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05 に更新
* 非包含オペレータ(absence...
...ps://blog.rubygems.org/2017/08/27/2.6.13-released.html

* securerandom
* SecureRandom.alphanumeric を追加

* set
* Set#to_s を Set#inspect の別名として追加 13676
* Set#=== を Set#include? の別名として追加 13801
* Set#reset 6589

* stringio
* StringIO#wr...

絞り込み条件を変える