5197件ヒット
[1-100件を表示]
(0.119秒)
クラス
-
ARGF
. class (110) - Array (147)
- BasicObject (132)
- Binding (54)
- Class (22)
- Data (6)
- Dir (176)
-
Encoding
:: Converter (44) -
Encoding
:: InvalidByteSequenceError (22) -
Encoding
:: UndefinedConversionError (11) - Enumerator (33)
-
Enumerator
:: ArithmeticSequence (30) -
Enumerator
:: Lazy (11) -
Enumerator
:: Yielder (27) - Exception (117)
- Fiber (54)
- File (77)
-
File
:: Stat (66) - FrozenError (5)
- Hash (11)
- IO (558)
- Integer (21)
- KeyError (7)
- LoadError (11)
- LocalJumpError (11)
- MatchData (92)
- Method (97)
- Module (596)
- Mutex (4)
- NameError (29)
- Numeric (95)
- Object (319)
- Proc (22)
- Random (22)
- Range (55)
- Refinement (3)
- Regexp (88)
-
RubyVM
:: InstructionSequence (88) - SignalException (22)
- StopIteration (11)
- String (176)
- Struct (14)
- Symbol (10)
- SystemCallError (11)
- SystemExit (22)
- Thread (209)
-
Thread
:: Backtrace :: Location (44) -
Thread
:: ConditionVariable (18) -
Thread
:: Mutex (18) -
Thread
:: Queue (9) -
Thread
:: SizedQueue (27) - TracePoint (183)
- UnboundMethod (33)
- UncaughtThrowError (10)
モジュール
- Comparable (5)
- Enumerable (154)
-
File
:: Constants (11) - Kernel (634)
- Math (11)
- ObjectSpace (33)
- Process (11)
-
Process
:: GID (22) -
Process
:: UID (22) -
RubyVM
:: AbstractSyntaxTree (2) - Signal (22)
- Warning (8)
キーワード
- ! (11)
- != (11)
-
$ & (11) -
$ & # 39; (11) -
$ 1 (11) -
$ 10 (11) -
$ 11 (11) -
$ 2 (11) -
$ 3 (11) -
$ 4 (11) -
$ 5 (11) -
$ 6 (11) -
$ 7 (11) -
$ 8 (11) -
$ 9 (11) -
$ _ (11) -
$ ` (11) -
$ stdin (11) -
$ ~ (11) - % (11)
-
/ (10) - < (11)
- << (11)
- <= (11)
- <=> (11)
- == (39)
- === (33)
- =~ (11)
- > (11)
- >= (11)
- APPEND (11)
- ARGF (11)
- BasicObject (11)
- ConditionVariable (9)
- DATA (11)
- EXTENDED (11)
- Fiber (11)
- Interrupt (11)
- Location (11)
- Numeric (11)
-
SEEK
_ END (11) - SizedQueue (9)
- Status (11)
- String (22)
- TracePoint (11)
- UndefinedConversionError (11)
- [] (99)
-
_ _ callee _ _ (11) -
_ _ method _ _ (11) -
_ _ send _ _ (22) -
_ dump (11) -
absolute
_ path (22) -
alias
_ method (11) - arity (22)
- at (11)
-
at
_ exit (11) - attr (24)
-
attr
_ accessor (8) -
attr
_ reader (8) -
attr
_ writer (11) - autoclose? (11)
- autoload (22)
- autoload? (11)
- backtrace (22)
-
backtrace
_ locations (11) -
base
_ label (22) - begin (28)
- bind (11)
- binding (33)
- binmode (11)
-
block
_ given? (11) - blockdev? (11)
- broadcast (9)
- byteoffset (4)
-
callee
_ id (11) - caller (33)
-
caller
_ locations (22) - catch (22)
- cause (11)
- chardev? (11)
- chdir (44)
- clamp (5)
-
class
_ eval (11) -
class
_ variable _ defined? (11) -
class
_ variable _ get (11) -
class
_ variable _ set (11) -
class
_ variables (11) - clone (11)
-
close
_ read (11) -
close
_ write (11) - coerce (11)
-
const
_ defined? (11) -
const
_ get (11) -
const
_ missing (11) -
const
_ source _ location (5) - constants (11)
- crypt (11)
- current (3)
- curry (10)
-
deconstruct
_ keys (2) - define (4)
-
define
_ finalizer (22) -
define
_ method (22) -
define
_ singleton _ method (22) -
defined
_ class (11) - delete (11)
-
delete
_ suffix (7) -
delete
_ suffix! (7) - deq (9)
- disable (22)
- disasm (11)
- disassemble (11)
- display (11)
- div (11)
- dup (11)
- each (55)
-
each
_ byte (44) -
each
_ codepoint (22) -
each
_ index (22) -
each
_ line (66) -
each
_ pair (22) -
each
_ with _ index (22) - enable (22)
-
end
_ with? (16) -
enum
_ for (22) - errno (11)
-
error
_ bytes (11) -
error
_ char (11) - eval (22)
-
eval
_ script (6) - event (11)
- exception (22)
-
exclude
_ end? (6) - exit (22)
- exit! (11)
-
exit
_ value (11) - fail (33)
- fcntl (11)
- fdatasync (11)
- feed (11)
- fetch (11)
- first (22)
-
first
_ lineno (11) -
fixed
_ encoding? (11) - flush (11)
- fork (33)
- format (11)
- gamma (11)
- gets (11)
-
handle
_ interrupt (11) - hash (17)
-
import
_ methods (3) - include (11)
- include? (11)
- included (11)
-
included
_ modules (11) -
incomplete
_ input? (11) - inherited (11)
- initialize (11)
-
initialize
_ copy (11) -
inplace
_ mode= (11) - inspect (66)
-
instance
_ eval (22) -
instance
_ exec (11) -
instance
_ method (11) -
instance
_ methods (11) -
instance
_ of? (11) -
instance
_ variable _ defined? (11) -
instance
_ variable _ get (11) -
instruction
_ sequence (6) -
internal
_ encoding (11) - invert (11)
-
is
_ a? (11) - iterator? (11)
- kill (22)
-
kind
_ of? (11) - label (11)
-
last
_ match (11) - lineno (11)
- list (11)
-
local
_ variable _ defined? (11) -
local
_ variable _ get (11) -
local
_ variable _ set (11) -
local
_ variables (19) - loop (11)
- lstat (11)
- main (11)
- match (22)
- max (22)
-
max
_ by (44) -
method
_ defined? (11) -
method
_ id (11) -
method
_ missing (11) -
method
_ undefined (11) - methods (11)
- min (44)
-
module
_ eval (11) -
module
_ function (19) - name (11)
- nesting (11)
- new (91)
- of (13)
- offset (22)
- open (44)
-
original
_ name (22) - pack (19)
- parameters (6)
- pass (11)
- path (55)
-
pending
_ interrupt? (22) - pid (11)
- pipe (88)
- pop (9)
- popen (154)
- pos (11)
- pos= (22)
- pread (7)
- prepend (19)
-
primitive
_ convert (44) - print (11)
- priority (11)
- priority= (11)
- private (23)
-
private
_ class _ method (15) -
private
_ constant (11) -
private
_ instance _ methods (11) -
private
_ method _ defined? (11) -
protected
_ method _ defined? (11) - public (23)
-
public
_ class _ method (15) -
public
_ constant (11) -
public
_ method _ defined? (11) -
public
_ send (22) - pwrite (7)
- raise (59)
-
raised
_ exception (11) - rand (22)
- read (11)
- readbyte (22)
- readchar (11)
- readline (11)
- receiver (32)
- refine (11)
-
remove
_ class _ variable (11) -
remove
_ instance _ variable (11) - rename (11)
- require (11)
-
require
_ relative (11) -
respond
_ to? (11) -
respond
_ to _ missing? (11) - result (11)
- resume (11)
-
return
_ value (11) - rewind (11)
-
ruby2
_ keywords (5) - seek (22)
- select (11)
-
set
_ backtrace (11) -
set
_ encoding _ by _ bom (5) -
set
_ trace _ func (11) - setgid? (11)
- setpriority (11)
- setuid? (11)
- shift (18)
- signal (9)
- signm (11)
- signo (11)
-
singleton
_ class? (11) -
singleton
_ method (11) -
singleton
_ method _ added (11) -
singleton
_ method _ removed (11) -
singleton
_ method _ undefined (11) -
singleton
_ methods (11) - size (11)
- sleep (33)
- socket? (11)
-
sort
_ by (22) -
source
_ location (11) - sprintf (11)
- start (11)
-
start
_ with? (16) - stat (11)
- status (11)
- step (84)
- sticky? (11)
- success? (11)
- sum (11)
-
super
_ method (10) - superclass (11)
- switch (44)
- sync (11)
- synchronize (11)
- sysseek (11)
- syswrite (11)
- tell (11)
- terminate (11)
- test (22)
-
thread
_ variable _ set (11) - throw (11)
-
to
_ enum (22) -
to
_ int (11) -
to
_ path (11) -
to
_ proc (5) -
to
_ s (76) -
to
_ str (11) - transfer (3)
- trap (22)
- truncate (11)
-
try
_ convert (11) - unbind (11)
-
undefine
_ finalizer (11) - unlink (11)
- unpack (11)
- unshift (7)
- upto (11)
- using (11)
- warn (15)
-
with
_ object (22) - write (11)
- yield (33)
- ~ (11)
検索結果
先頭5件
-
Enumerator
:: ArithmeticSequence # end -> Numeric | nil (21203.0) -
末項(終端)を返します。
...末項(終端)を返します。
@see Enumerator::ArithmeticSequence#begin... -
Thread
. pending _ interrupt?(error = nil) -> bool (18326.0) -
非同期割り込みのキューが空かどうかを返します。
...Thread.handle_interrupt は非同期割り込みの発生を延期させるのに使
用しますが、本メソッドは任意の非同期割り込みが存在するかどうかを確認す
るのに使用します。
本メソッドが true を返した場合、Thread.handle_interrupt で例外......だちに発生させる。
def Thread.kick_interrupt_immediately
Thread.handle_interrupt(Object => :immediate) {
Thread.pass
}
end
=== 使い方
th = Thread.new{
Thread.handle_interrupt(RuntimeError => :on_blocking){
while true
...
# ここまでで......
if Thread.pending_interrupt?
Thread.handle_interrupt(Object => :immediate){}
end
...
end
}
}
...
th.raise # スレッド停止。
この例は以下のように記述する事もできます。
flag = true
th = Thread.new{
Thread.handle_in... -
Thread
# pending _ interrupt?(error = nil) -> bool (18302.0) -
self の非同期例外のキューが空かどうかを返します。
...self の非同期例外のキューが空かどうかを返します。
@param error 対象の例外クラスを指定します。
@see Thread.pending_interrupt?... -
MatchData
# end(n) -> Integer | nil (18239.0) -
n 番目の部分文字列終端のオフセットを返します。
...nil を返します。
@param n 部分文字列を指定する数値。
@raise IndexError 範囲外の n を指定した場合に発生します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # => 6
p $~.end(3) # => nil
p $~.end......(4) # => `end': index 4 out of matches (IndexError)
//}
@see MatchData#begin... -
Encoding
:: InvalidByteSequenceError # incomplete _ input? -> bool (18214.0) -
エラー発生時に入力文字列が不足している場合に真を返します。
...す。
//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1z")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "z" on EUC-JP>
p $!.incomplete_input? #=> false
end
begin
ec.conve......rt("abc\xA1")
ec.finish
rescue Encoding::InvalidByteSequenceError
p $! #=> #<Encoding::InvalidByteSequenceError: incomplete "\xA1" on EUC-JP>
p $!.incomplete_input? #=> true
end
//}... -
TracePoint
# binding -> Binding (15414.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...発生したイベントによって生成された Binding オブジェクトを返します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
TracePoint
# binding -> Binding | nil (15414.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...れた Binding オブジェクトを返します。
C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:......call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
Kernel
. # binding -> Binding (12408.0) -
変数・メソッドなどの環境情報を含んだ Binding オブジェクトを 生成して返します。通常、Kernel.#eval の第二引数として使います。
...変数・メソッドなどの環境情報を含んだ Binding オブジェクトを
生成して返します。通常、Kernel.#eval の第二引数として使います。
//emlist[例][ruby]{
def foo
a = 1
binding
end
eval("p a", foo) #=> 1
//}
@see Kernel.#eval,Object::TOPLEVEL_BINDING... -
Proc
# binding -> Binding (12408.0) -
Proc オブジェクトが保持するコンテキストを Binding オブジェクトで返します。
...Proc オブジェクトが保持するコンテキストを
Binding オブジェクトで返します。
//emlist[例][ruby]{
def fred(param)
proc {}
end
sample_proc = fred(99)
eval("param", sample_proc.binding) # => 99
//}... -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (12250.0) -
self に特異メソッド name を定義します。
...m symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class <<......self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# define _ singleton _ method(symbol , method) -> Symbol (12250.0) -
self に特異メソッド name を定義します。
...m symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class <<......self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}...