48件ヒット
[1-48件を表示]
(0.032秒)
クラス
- CSV (12)
-
RubyVM
:: InstructionSequence (24) - StringScanner (12)
キーワード
- disasm (12)
- disassemble (12)
- generate (12)
- new (12)
検索結果
先頭4件
-
StringScanner
. new(str , dup = false) -> StringScanner (3220.0) -
新しい StringScanner オブジェクトを生成します。
...新しい StringScanner オブジェクトを生成します。
@param str スキャン対象の文字列を指定します。
@param dup dup は単に無視します。
引数の文字列は複製も freeze もされず、そのまま使います。
//emlist[例][ruby]{
require 'strs......can'
s = StringScanner.new('This is an example string')
s.eos? #=> false
p s.scan(/\w+/) #=> "This"
p s.scan(/\w+/) #=> nil
p s.scan(/\s+/) #=> " "
//}... -
RubyVM
:: InstructionSequence . disasm(body) -> String (109.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
...1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setlocal num, 0
0012 leave
例2:Method オブジェクトを指定した場合
# /tmp/method.rb
def hello
puts "hello, w......( 1)
0002 trace 1 ( 2)
0004 putself
0005 putstring "hello, world"
0007 send :puts, 1, nil, 8, <ic:0>
0013 trace 16 (... -
RubyVM
:: InstructionSequence . disassemble(body) -> String (109.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
...1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setlocal num, 0
0012 leave
例2:Method オブジェクトを指定した場合
# /tmp/method.rb
def hello
puts "hello, w......( 1)
0002 trace 1 ( 2)
0004 putself
0005 putstring "hello, world"
0007 send :puts, 1, nil, 8, <ic:0>
0013 trace 16 (... -
CSV
. generate(str = "" , options = Hash . new) {|csv| . . . } -> String (108.0) -
このメソッドは与えられた文字列をラップして CSV のオブジェクトとしてブロックに渡します。 ブロック内で CSV オブジェクトに行を追加することができます。 ブロックを評価した結果は文字列を返します。
...ます。
このメソッドに与えられた文字列は変更されるので、新しい文字列オブジェクトが必要な
場合は Object#dup で複製してください。
@param str 文字列を指定します。デフォルトは空文字列です。
@param options CSV.new のオプ......ます。
このメソッドに与えられた文字列は変更されるので、新しい文字列オブジェクトが必要な
場合は Object#dup で複製してください。
@param str 文字列を指定します。デフォルトは空文字列です。
2.5.0 では不具合...