1082件ヒット
[1-100件を表示]
(0.066秒)
クラス
-
ARGF
. class (66) - Array (11)
- Binding (33)
-
Encoding
:: Converter (33) - Enumerator (22)
-
Enumerator
:: Lazy (10) - Exception (22)
- File (22)
-
File
:: Stat (22) - IO (173)
- MatchData (26)
- Module (22)
- Object (33)
- RubyVM (1)
- String (15)
- Thread (66)
- Time (55)
- TracePoint (11)
モジュール
- Enumerable (116)
- FileTest (22)
- Kernel (70)
- Process (77)
-
Process
:: Sys (121)
キーワード
-
$ -I (5) -
$ : (5) -
$ @ (11) -
$ LOAD _ PATH (5) - ENETRESET (11)
- IO (11)
-
SEEK
_ SET (11) - TracePoint (11)
- [] (11)
-
add
_ trace _ func (11) - advise (11)
- all? (29)
- any? (29)
-
backtrace
_ locations (11) - binread (11)
- binwrite (11)
- byteindex (2)
- byteoffset (4)
- byterindex (2)
- caller (33)
-
class
_ variable _ set (11) -
const
_ set (11) -
copy
_ stream (11) -
defined
_ class (11) - difference (6)
-
external
_ encoding (11) - getlocal (11)
-
gmt
_ offset (11) - gmtoff (11)
-
instance
_ variable _ defined? (11) -
instance
_ variable _ get (11) -
instance
_ variable _ set (11) -
internal
_ encoding (22) - intersection (5)
- issetugid (11)
-
local
_ variable _ defined? (11) -
local
_ variable _ get (11) -
local
_ variable _ set (11) - localtime (11)
- none? (29)
- offset (22)
- one? (29)
- pos= (11)
- pread (7)
-
primitive
_ convert (33) - pwrite (7)
- read (11)
-
resolve
_ feature _ path (1) - seek (22)
-
set
_ backtrace (11) -
set
_ encoding (66) -
set
_ encoding _ by _ bom (5) -
set
_ trace _ func (22) - setbyte (11)
- setegid (11)
- seteuid (11)
- setgid (11)
- setgid? (33)
- setpgid (11)
- setpgrp (11)
- setpriority (11)
- setproctitle (11)
- setregid (11)
- setresgid (11)
- setresuid (11)
- setreuid (11)
- setrgid (11)
- setrlimit (22)
- setruid (11)
- setsid (11)
- setuid (11)
- setuid? (33)
- sysseek (11)
-
thread
_ variable? (11) -
thread
_ variable _ get (11) -
thread
_ variable _ set (11) -
utc
_ offset (11) -
with
_ index (32) - write (11)
検索結果
先頭5件
-
Module
# const _ set(name , value) -> object (6127.0) -
モジュールに name で指定された名前の定数を value とい う値として定義し、value を返します。
...ule Foo; end
# Symbolを指定した場合
Foo.const_set(:FOO, 123)
Foo::FOO # => 123
# Stringを指定した場合
Foo.const_set('BAR', 'abc')
Foo::BAR # => "abc"
# 既に定義されている定数の名前を指定した場合
Foo.const_set('BAR', '123')
# warning: already initialized constant......Foo::BAR
# warning: previous definition of BAR was here
# => "123"
# 不適切な定数名を指定した場合
Foo.const_set('foo', 1) # => NameError: wrong constant name foo
//}... -
Thread
# set _ trace _ func(pr) -> Proc | nil (6127.0) -
スレッドにトレース用ハンドラを設定します。
...設定したハンドラを返します。
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
2.to_s
Thread.current.set_trace_func nil
3.to_s
end
th.set_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 2, nil, #<Binding:0x00007fc8de87cb08>, nil]
# => ["c-call",......"c-return", "example.rb", 5, :current, #<Binding:0x00007fc8de9673b0>, Thread]
# => ["c-call", "example.rb", 5, :set_trace_func, #<Binding:0x00007fc8de966fc8>, Thread]
//}
@param pr トレースハンドラ(Proc オブジェクト) もしくは nil
@see Thread#add_trace_func Kernel.#set_trace_func... -
Binding
# local _ variable _ set(symbol , obj) (6121.0) -
引数 symbol で指定した名前のローカル変数に引数 obj を設定します。
...ブジェクトを指定します。
//emlist[例][ruby]{
def foo
a = 1
bind = binding
bind.local_variable_set(:a, 2) # set existing local variable `a'
bind.local_variable_set(:b, 3) # create new local variable `b'
# `b' exists only in binding
p bind.local... -
IO
# set _ encoding _ by _ bom -> Encoding | nil (6115.0) -
BOM から IO のエンコーディングを設定します。
...bom.txt", "rb") do |io|
p io.set_encoding_by_bom #=> #<Encoding:UTF-8>
str = io.read
p str #=> "abc"
p str.encoding #=> #<Encoding:UTF-8>
end
File.write("nobom.txt", "abc")
File.open("nobom.txt", "rb") do |io|
p io.set_encoding_by_bom #=> nil
e... -
Kernel
. # set _ trace _ func(proc) -> Proc (6115.0) -
Ruby インタプリタのイベントをトレースする Proc オブジェクトとして 指定された proc を登録します。 nil を指定するとトレースがオフになります。
...、トレースをオフにします。
@return proc を返します。
//emlist[例][ruby]{
set_trace_func lambda {|*arg|
p arg
}
class Foo
end
43.to_s
# ----結果----
# ["c-return", "..", 1, :set_trace_func, #<Binding:0xf6ceb8>, Kernel]
# ["line", "..", 4, nil, #<Binding:0x10cbcd8>, nil]
# [... -
Object
# instance _ variable _ set(var , value) -> object (6115.0) -
オブジェクトのインスタンス変数 var に値 value を設定します。
...m value 設定する値です。
@return value を返します。
//emlist[][ruby]{
obj = Object.new
p obj.instance_variable_set("@foo", 1) #=> 1
p obj.instance_variable_set(:@foo, 2) #=> 2
p obj.instance_variable_get(:@foo) #=> 2
//}
@see Object#instance_variable_get,Object#instance_varia... -
Thread
# thread _ variable _ set(key , value) (6115.0) -
引数 key で指定した名前のスレッドローカル変数に引数 value をセットしま す。
...で使える事に注意してく
ださい。
//emlist[例][ruby]{
thr = Thread.new do
Thread.current.thread_variable_set(:cat, 'meow')
Thread.current.thread_variable_set("dog", 'woof')
end
thr.join # => #<Thread:0x401b3f10 dead>
thr.thread_variables # => [:dog, :cat]
//}
@see... -
ARGF
. class # set _ encoding(enc _ str , options = {}) -> self (6111.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
...して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで
区... -
ARGF
. class # set _ encoding(ext _ enc) -> self (6111.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
...して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで
区... -
ARGF
. class # set _ encoding(ext _ enc , int _ enc , options = {}) -> self (6111.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
...して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで
区...