別のキーワード
ライブラリ
- ビルトイン (1643)
-
shell
/ command-processor (12)
クラス
- Array (44)
- Class (22)
- Data (4)
- Dir (105)
- Encoding (11)
- Enumerator (18)
-
Enumerator
:: Lazy (11) - Exception (7)
- Fiber (25)
- File (373)
- Hash (38)
- IO (242)
- Integer (3)
- Module (19)
- Object (11)
- Random (17)
- Regexp (44)
- RubyVM (1)
-
RubyVM
:: InstructionSequence (106) -
Shell
:: CommandProcessor (12) - SignalException (22)
- String (19)
- Struct (25)
- Symbol (11)
- SystemCallError (11)
- Thread (96)
-
Thread
:: ConditionVariable (9) -
Thread
:: Queue (6) - TracePoint (32)
モジュール
- GC (66)
-
GC
:: Profiler (33) - Process (22)
-
RubyVM
:: AbstractSyntaxTree (24) -
RubyVM
:: MJIT (18) - Warning (5)
キーワード
- === (11)
- DEBUG (11)
- DEBUG= (11)
- [] (38)
- abort (22)
-
abort
_ on _ exception (11) -
abort
_ on _ exception= (11) -
absolute
_ path (11) -
absolute
_ path? (5) -
all
_ symbols (11) -
auto
_ compact (3) -
auto
_ compact= (3) - basename (11)
- binread (11)
- binwrite (11)
- birthtime (10)
- blockdev? (11)
- bytes (6)
- chardev? (11)
- chdir (22)
- clone (11)
- compatible? (11)
- compile (11)
-
compile
_ file (11) -
compile
_ option (11) -
compile
_ option= (11) - constants (11)
- current (3)
-
def
_ builtin _ commands (6) - define (2)
-
define
_ method (22) - directory? (11)
- disable (22)
- disasm (11)
- disassemble (11)
- empty? (27)
- enable (22)
- enabled? (17)
- exclusive (11)
- executable? (11)
-
executable
_ real? (11) - exist? (22)
- exists? (18)
- file? (11)
- fnmatch (11)
- fnmatch? (11)
-
for
_ fd (11) - glob (22)
- grpowned? (11)
-
handle
_ interrupt (11) -
has
_ key? (11) -
has
_ value? (11) - identical? (11)
- include? (11)
-
install
_ builtin _ commands (6) - join (11)
- key? (11)
-
keyword
_ init? (3) -
last
_ match (22) -
latest
_ gc _ info (11) -
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - member? (11)
- members (13)
- new (195)
- of (19)
- open (55)
- owned? (11)
- parse (8)
-
parse
_ file (8) - pause (6)
-
pending
_ interrupt? (11) - pipe (88)
- pipe? (11)
- popen (77)
- private (4)
- public (23)
- readable? (11)
-
readable
_ real? (11) - realdirpath (11)
- realpath (11)
-
report
_ on _ exception (8) -
resolve
_ feature _ path (1) - resume (6)
-
ruby2
_ keywords _ hash? (5) - setgid? (11)
- setuid? (11)
- socket? (11)
- srand (11)
- stat (21)
- sticky? (11)
- stop (11)
- stress (11)
- symlink? (11)
-
to
_ h (6) -
to
_ tty? (7) - trace (11)
-
try
_ convert (58) - union (11)
-
used
_ modules (8) - value? (11)
-
verify
_ compaction _ references (5) -
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - yield (11)
- zero? (11)
検索結果
先頭5件
-
Symbol
. all _ symbols -> [Symbol] (17201.0) -
定義済みの全てのシンボルオブジェクトの配列を返します。
...定義済みの全てのシンボルオブジェクトの配列を返します。
p Symbol.all_symbols #=> [:RUBY_PLATFORM, :RUBY_VERSION, ...]
リテラルで表記したシンボルのうち、コンパイル時に値が決まるものはその時に生成されます。
それ以外の式......あります)
def number
'make_3'
end
p Symbol.all_symbols.select{|sym|sym.to_s.include? 'make'}
#=> [:make_1, :make_2]
re = #確実に生成されるように代入操作を行う
:make_1,
:'make_2',
:"#{number}",
'make_4'.intern
p Symbol.all_symbols.select{|sym|sym.to_... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (14201.0) -
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
...RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起......りません。自分が変換したバイナリデータを使うべきです。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
//}
@see RubyVM::InstructionSequence#to_binary... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (14201.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... -
Thread
. abort _ on _ exception -> bool (14201.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例外は、Thread#join などで検出されない限りそのスレッドだけをなにも警告を出さずに終了させます。
...@param newstate スレッド実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
Thread.abort_on_exception # => false
Thread.abort_on_exception = true
Thread.abort_on_exception # => true
//}......。
@param newstate スレッド実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
Thread.abort_on_exception # => false
Thread.abort_on_exception = true
Thread.abort_on_exception # => true
//}... -
Encoding
. compatible?(obj1 , obj2) -> Encoding | nil (14107.0) -
2つのオブジェクトのエンコーディングに関する互換性をチェックします。 互換性がある場合はそのエンコーディングを、 ない場合は nil を返します。
...文字列が取るであろう Encoding オブジェクトを返します。
//emlist[例][ruby]{
Encoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b")
#=> #<Encoding:ISO-8859-1>
Encoding.compatible?(
"\xa1".force_encoding("iso-8859-1"),
"\xa1\xa1".force_encoding("euc-jp"))
#=> nil
//......ことができます。
//emlist[例][ruby]{
Encoding.compatible?(Encoding::UTF_8, Encoding::CP932)
# => nil
Encoding.compatible?(Encoding::UTF_8, Encoding::US_ASCII)
# => #<Encoding:UTF-8>
//}
@param obj1 チェック対象のオブジェクト
@param obj2 チェック対象のオブジェクト... -
Data
. members -> [Symbol] (14101.0) -
値オブジェクトのメンバの名前(Symbol)の配列を返します。
...値オブジェクトのメンバの名前(Symbol)の配列を返します。
//emlist[例][ruby]{
Foo = Data.define(:foo, :bar)
p Foo.members # => [:foo, :bar]
//}... -
File
. absolute _ path(file _ name , dir _ string=nil) -> String (14101.0) -
file_name を絶対パスに変換した文字列を返します。
...例][ruby]{
p Dir.getwd #=> "/home/matz/work/bar"
p ENV["HOME"] #=> "/home/matz"
p File.absolute_path("..") #=> "/home/matz/work"
p File.absolute_path("..", "/tmp") #=> "/"
p File.absolute_path("~") #=> "/home/matz/work/bar/~"
p File.absolute_......path("~foo") #=> "/home/matz/work/bar/~foo"
//}
@see File.expand_path... -
File
. absolute _ path?(file _ name) -> bool (14101.0) -
file_name が絶対パスなら true を、そうでなければ false を返します。
...[ruby]{
File.absolute_path?("//foo/bar\\baz") # => true
File.absolute_path?("C:foo\\bar") # => false
File.absolute_path?("~") # => false
# プラットフォームが cygwin、mswin、mingw の場合
File.absolute_path?("C:\\foo\\bar") # => true
File.absolute_path?("/foo/bar\\baz......") # => false
# プラットフォームが上記以外の場合
File.absolute_path?("C:\\foo\\bar") # => false
File.absolute_path?("/foo/bar\\baz") # => true
//}... -
File
. basename(filename , suffix = "") -> String (14101.0) -
filename の一番後ろのスラッシュに続く要素を返します。もし、 引数 suffix が与えられて、かつそれが filename の末尾に 一致するなら、それを取り除いたものを返します。
...ruby]{
p File.basename("ruby/ruby.c") #=> "ruby.c"
p File.basename("ruby/ruby.c", ".c") #=> "ruby"
p File.basename("ruby/ruby.c", ".*") #=> "ruby"
p File.basename("ruby/ruby.exe", ".*") #=> "ruby"
p File.basename("ruby/y.tab.c", ".*") #=> "y.tab"
//}
File.basename の動作は bas......ename(3)
に従います。
//emlist[例][ruby]{
p File.basename("foo/bar/") # => "bar"
//}
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカ... -
File
. birthtime(filename) -> Time (14101.0) -
作成された時刻を返します。
...指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
@raise NotImplementedError Windows のような birthtime のない環境で発生します。
//emlist[例][ruby]{
File.birthtime("testfile") #=> Wed Apr 09 08:53:13 CDT 2003
//}... -
File
. blockdev?(path) -> bool (14101.0) -
FileTest.#blockdev? と同じです。
...FileTest.#blockdev? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev?...