116件ヒット
[101-116件を表示]
(0.035秒)
別のキーワード
ライブラリ
- ビルトイン (116)
クラス
- Regexp (24)
-
RubyVM
:: InstructionSequence (92)
キーワード
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) -
load
_ from _ binary (10) -
load
_ from _ binary _ extra _ data (10) - new (24)
- of (12)
検索結果
先頭2件
-
Regexp
. new(string , option = nil , code = nil) -> Regexp (3026.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...現のコンパイルに失敗した場合発生します。
//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
this # ここは使用されない
\ is
\ regexp # ここも......使用されない
', Regexp::EXTENDED | Regexp::IGNORECASE)
t2.match(str)
p Regexp.last_match # => "This is Regexp"
str = "ふるいけや\nかわずとびこむ\nみずのおと"
t2 = Regexp.compile("ふる.*?と", Regexp::MULTILINE)
p t2.match(str)[0] # => "ふるいけや\nかわずと"
//}... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (3013.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary...