別のキーワード
ライブラリ
- ビルトイン (1206)
- abbrev (12)
- json (180)
-
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / rational (12) - logger (24)
- matrix (24)
-
net
/ http (12) - open-uri (12)
- optparse (36)
- pathname (48)
- rake (84)
-
rake
/ packagetask (12) -
rexml
/ document (144) -
ripper
/ lexer (16) -
rubygems
/ gem _ path _ searcher (12) -
rubygems
/ installer (12) -
rubygems
/ specification (24) - stringio (74)
- strscan (96)
- win32ole (12)
クラス
-
ARGF
. class (12) - Array (33)
- Binding (7)
- Class (12)
- Data (6)
- Date (12)
- DateTime (12)
- Dir (24)
- Enumerator (24)
- File (24)
-
File
:: Stat (24) - Float (24)
-
Gem
:: GemPathSearcher (12) -
Gem
:: Installer (12) -
Gem
:: Specification (24) - IO (6)
-
JSON
:: State (60) - Logger (24)
- MatchData (158)
- Matrix (24)
- Method (12)
- Module (216)
-
Net
:: HTTPGenericRequest (12) - Object (15)
- OptionParser (36)
- Pathname (48)
- Proc (12)
-
REXML
:: Attribute (36) -
REXML
:: Attributes (36) -
REXML
:: CData (24) -
REXML
:: DocType (12) -
REXML
:: Element (36) -
Rake
:: Application (36) -
Rake
:: FileList (36) -
Rake
:: InvocationChain (12) -
Rake
:: PackageTask (12) - Range (33)
- Rational (36)
-
Ripper
:: Lexer (16) -
RubyVM
:: InstructionSequence (34) - String (413)
- StringIO (74)
- StringScanner (96)
- Symbol (9)
-
Thread
:: Backtrace :: Location (72) - Time (12)
- TracePoint (12)
- UnboundMethod (12)
-
WIN32OLE
_ TYPELIB (12)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
OpenURI
:: Meta (12)
キーワード
- % (14)
- [] (60)
- abbrev (12)
-
absolute
_ path (24) -
add
_ element (12) -
array
_ nl (12) - attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) -
attribute
_ of (12) - autoload (12)
-
base
_ label (12) - binread (12)
- byteindex (3)
- byterindex (3)
- bytes (7)
- captures (12)
- concat (33)
-
const
_ source _ location (12) -
datetime
_ format (12) - deconstruct (2)
-
deprecate
_ constant (12) - dev (12)
- each (12)
-
each
_ byte (24) -
each
_ char (12) -
each
_ codepoint (12) -
each
_ grapheme _ cluster (8) -
each
_ line (24) -
formatted
_ program _ filename (12) - formatter (12)
- ftype (12)
- gsub (48)
- gsub! (60)
- indent (12)
- index (12)
- inspect (63)
-
json
_ creatable? (12) - label (12)
- lex (8)
-
lib
_ dirs _ for (12) - lines (7)
- match (24)
- match? (30)
- matched (12)
- matched? (12)
-
matched
_ size (12) - name (12)
- names (12)
- namespace (12)
- namespaces (12)
-
object
_ nl (12) - on (36)
-
original
_ dir (12) - pack (21)
-
package
_ dir _ path (12) - parse (8)
- path (99)
- pathmap (12)
-
post
_ match (24) -
pre
_ match (24) - prefix (12)
- prefixes (12)
- printf (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) - rakefile (12)
-
remove
_ const (12) - rindex (12)
-
rubygems
_ version (12) - scan (24)
-
source
_ location (43) - space (12)
-
space
_ before (12) - status (12)
- step (19)
- strftime (12)
- sub (60)
- sub! (48)
- terminate (12)
- text (12)
- then (7)
-
to
_ a (12) -
to
_ binary (10) -
to
_ f (12) -
to
_ json (144) -
to
_ path (27) -
to
_ r (12) -
to
_ ruby (12) -
to
_ s (99) -
to
_ string (12) - tr (12)
-
tr
_ s (12) -
tr
_ s! (12) - truncate (12)
- unpack (12)
- unpack1 (9)
- value (12)
-
values
_ at (12) -
with
_ object (24) - xpath (12)
-
yield
_ self (8)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (32302.0) -
self が表す命令シーケンスの絶対パスを返します。
...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = Ruby......VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # path -> String (32302.0) -
self が表す命令シーケンスの相対パスを返します。
...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = Ruby......VM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"
@see RubyVM::InstructionSequence#absolute_path... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (26332.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッド......せん。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extra_data")
# ※表示の都合上改行しているが実際は改行......\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00\x00\x00\x00\x01
# \x00\x00\x00\x00\x00\x00\x00\\\x00\x00\x00\x00\x00\x00\x00\x0F\x00\x00\x00
# \x00\x00\x00\x00\x02\x00... -
MatchData
# string -> String (24321.0) -
マッチ対象になった文字列の複製を返します。
...マッチ対象になった文字列の複製を返します。
返す文字列はフリーズ(Object#freeze)されています。
//emlist[例][ruby]{
m = /(.)(.)(\d+)(\d)/.match("THX1138.")
m.string # => "THX1138."
//}... -
String
# match(regexp , pos = 0) -> MatchData | nil (15437.0) -
regexp.match(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match を参照してください。
...regexp.match(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match を参照してください。
//emlist[例: regexp のみの場合][ruby]{
'hello'.match('(.)\1') # => #<MatchData "ll" 1:"l">
'hello'.match('(.)\......[0] # => "ll"
'hello'.match(/(.)\1/)[0] # => "ll"
'hello'.match('xx') # => nil
//}
//emlist[例: regexp, pos を指定した場合][ruby]{
'hoge hige hege bar'.match('h.ge', 0) # => #<MatchData "hoge">
'hoge hige hege bar'.match('h.ge', 1) # => #<MatchData "hige">
//}
//emlist[......例: ブロックを指定した場合][ruby]{
'hello'.match('(.)\1'){|e|"match #{$1}"} # => "match l"
'hello'.match('xx'){|e|"match #{$1}"} # マッチしないためブロックは実行されない
//}
@see Regexp#match, Symbol#match... -
Gem
:: Specification # to _ ruby -> String (15436.0) -
自身を再現するための Ruby スクリプトを文字列で返します。
...自身を再現するための Ruby スクリプトを文字列で返します。
省略されている値はデフォルト値が使用されます。... -
Gem
:: Specification # rubygems _ version -> String (15402.0) -
この Gem パッケージを作成した RubyGems のバージョンを返します。
...この Gem パッケージを作成した RubyGems のバージョンを返します。... -
String
# match?(regexp , pos = 0) -> bool (15249.0) -
regexp.match?(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match? を参照してください。
...regexp.match?(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match? を参照してください。
//emlist[例][ruby]{
"Ruby".match?(/R.../) #=> true
"Ruby".match?(/R.../, 1) #=> false
"Ruby".match?(/P.../) #=>......false
$& #=> nil
//}
@see Regexp#match?, Symbol#match?... -
String
# match(regexp , pos = 0) {|m| . . . } -> object (15237.0) -
regexp.match(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match を参照してください。
...regexp.match(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match を参照してください。
//emlist[例: regexp のみの場合][ruby]{
'hello'.match('(.)\1') # => #<MatchData "ll" 1:"l">
'hello'.match('(.)\......[0] # => "ll"
'hello'.match(/(.)\1/)[0] # => "ll"
'hello'.match('xx') # => nil
//}
//emlist[例: regexp, pos を指定した場合][ruby]{
'hoge hige hege bar'.match('h.ge', 0) # => #<MatchData "hoge">
'hoge hige hege bar'.match('h.ge', 1) # => #<MatchData "hige">
//}
//emlist[......例: ブロックを指定した場合][ruby]{
'hello'.match('(.)\1'){|e|"match #{$1}"} # => "match l"
'hello'.match('xx'){|e|"match #{$1}"} # マッチしないためブロックは実行されない
//}
@see Regexp#match, Symbol#match...