るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node (18280.0)

引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。

...ntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end


pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
#...
...(ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hell...

RubyVM::AbstractSyntaxTree.of(proc, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node (18280.0)

引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。

...ntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end


pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
#...
...(ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hell...

RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node (18279.0)

引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。

...ntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end


pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
#...
...(ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hell...

RubyVM::InstructionSequence.of(body) -> RubyVM::InstructionSequence (18249.0)

引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。

...

# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_binding@(irb)>

# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>

例2: Ruby...
...o, world"
end


$a_global_proc = proc { str = 'a' + 'b' }

# irb
> require '/tmp/iseq_of.rb'

# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>

# グローバル proc
> RubyVM::InstructionSequence.of($a_glob...

MatchData#end(n) -> Integer | nil (18243.0)

n 番目の部分文字列終端のオフセットを返します。

...IndexError 範囲外の n を指定した場合に発生します。

//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # => 6
p $~.end(3) # => nil
p $~.end(4) # => `end': index 4 out of matches (IndexError)
//}

@see MatchData#begin...

絞り込み条件を変える

Object#instance_of?(klass) -> bool (6243.0)

オブジェクトがクラス klass の直接のインスタンスである時真を返します。

...obj.instance_of?(c) が成立する時には、常に obj.kind_of?(c) も成立します。

@param klass Classかそのサブクラスのインスタンスです。

//emlist[][ruby]{
class C < Object
end

class S < C
end


obj = S.new
p obj.instance_of?(S) # true
p obj.instance_of?(C) #...
...false
//}

@see Object#kind_of?,Object#class...

Symbol#end_with?(*suffixes) -> bool (6237.0)

self の末尾が suffixes のいずれかであるとき true を返します。

...

(self.to_s.end_with?と同じです。)

@param suffixes パターンを表す文字列 (のリスト)

@see Symbol#start_with?

@see String#end_with?

//emlist[][ruby]{
:hello.end_with?("ello") #=> true

# returns true if one of the +suffixes+ matches.
:hello.end_with?("heaven",...
..."ello") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}...

IRB::InputMethod#readable_atfer_eof? -> false (6232.0)

入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。

...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。...

IRB::ReadlineInputMethod#eof? -> bool (6232.0)

入力が EOF(End Of File)に達したかどうかを返します。

...入力が EOF(End Of File)に達したかどうかを返します。...

IRB::ReadlineInputMethod#readable_atfer_eof? -> false (6232.0)

入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。

...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。...

絞り込み条件を変える

IRB::StdioInputMethod#eof? -> bool (6232.0)

入力が EOF(End Of File)に達したかどうかを返します。

...入力が EOF(End Of File)に達したかどうかを返します。...

IRB::StdioInputMethod#readable_atfer_eof? -> true (6232.0)

入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。

...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。...
<< 1 2 3 ... > >>