クラス
-
ARGF
. class (240) - Array (105)
- Bignum (9)
- Binding (54)
- Class (12)
- Complex (132)
- Data (6)
- Dir (167)
- Encoding (96)
-
Encoding
:: Converter (168) -
Encoding
:: InvalidByteSequenceError (36) -
Encoding
:: UndefinedConversionError (24) -
Enumerator
:: ArithmeticSequence (98) -
Enumerator
:: Chain (7) - Exception (68)
- FalseClass (24)
- File (204)
-
File
:: Stat (60) - Fixnum (9)
- Float (36)
- Hash (24)
- IO (454)
- Integer (179)
- LoadError (12)
- MatchData (158)
- Method (71)
- Module (396)
- NameError (22)
- NilClass (12)
- NoMethodError (25)
- Numeric (611)
- Object (280)
- Proc (60)
-
Process
:: Status (24) - Random (29)
- Range (52)
- Rational (24)
- Regexp (144)
- RubyVM (24)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (128) - Set (6)
- SignalException (12)
- String (2184)
- Struct (24)
- Symbol (161)
- SyntaxError (3)
- Thread (124)
-
Thread
:: Backtrace :: Location (72) -
Thread
:: ConditionVariable (40) - Time (78)
- TracePoint (31)
- TrueClass (24)
- UnboundMethod (60)
- UncaughtThrowError (11)
モジュール
- Enumerable (24)
-
File
:: Constants (12) - FileTest (36)
- GC (30)
-
GC
:: Profiler (12) - Kernel (744)
- Marshal (12)
- Process (84)
-
Process
:: GID (36) -
Process
:: Sys (48) -
Process
:: UID (36) -
RubyVM
:: AbstractSyntaxTree (16) - Signal (36)
- Warning (1)
キーワード
-
$ " (12) -
$ & (12) -
$ & # 39; (12) -
$ * (12) -
$ + (12) -
$ , (12) -
$ -0 (12) -
$ -F (12) -
$ -I (12) -
$ -i (12) -
$ / (12) -
$ 0 (12) -
$ 1 (12) -
$ 10 (12) -
$ 11 (12) -
$ 2 (12) -
$ 3 (12) -
$ 4 (12) -
$ 5 (12) -
$ 6 (12) -
$ 7 (12) -
$ 8 (12) -
$ 9 (12) -
$ : (12) -
$ ; (12) -
$ @ (12) -
$ FILENAME (12) -
$ LOADED _ FEATURES (12) -
$ LOAD _ PATH (12) -
$ PROGRAM _ NAME (12) -
$ \ (12) -
$ _ (12) -
$ ` (12) - % (43)
- * (36)
- ** (12)
- + (24)
- +@ (22)
- - (12)
- -@ (22)
-
/ (23) - << (12)
- <=> (24)
- == (19)
- === (24)
- =~ (24)
- ArithmeticSequence (7)
- ConditionVariable (20)
- EADDRINUSE (12)
-
INSTRUCTION
_ NAMES (12) - MACCYRILLIC (12)
- MacCyrillic (12)
- NULL (12)
- Numeric (12)
- OPTS (24)
-
PRIO
_ PGRP (12) -
PRIO
_ PROCESS (12) -
PRIO
_ USER (12) -
RUBY
_ COPYRIGHT (12) -
RUBY
_ DESCRIPTION (12) -
RUBY
_ ENGINE (12) -
RUBY
_ ENGINE _ VERSION (10) -
RUBY
_ PLATFORM (12) -
RUBY
_ RELEASE _ DATE (12) -
RUBY
_ REVISION (6) -
RUBY
_ VERSION (12) -
SCRIPT
_ LINES _ _ (12) - ScriptError (12)
- SecurityError (12)
- String (24)
- WaitWritable (12)
- [] (204)
- []= (84)
-
_ _ dir _ _ (12) -
_ dump (12) - ` (12)
- abs (24)
- abs2 (24)
-
absolute
_ path (36) -
alias
_ method (12) - angle (12)
-
append
_ as _ bytes (1) - arg (12)
- argv0 (12)
- arity (36)
-
ascii
_ only? (12) -
asciicompat
_ encoding (12) - asctime (12)
-
attr
_ writer (12) - autoload? (24)
- b (12)
- backtrace (24)
-
base
_ label (24) - basename (12)
- begin (7)
- binread (12)
- binwrite (12)
- broadcast (10)
- byteindex (3)
- byterindex (3)
- bytes (43)
- bytesize (12)
- byteslice (36)
- bytesplice (10)
- caller (36)
- capitalize (12)
- capitalize! (12)
- captures (12)
- casecmp (12)
- casecmp? (9)
- categories (1)
- ceil (12)
- center (12)
-
change
_ privilege (24) - chars (24)
- children (23)
- chomp (24)
- chomp! (12)
- chop (24)
- chop! (12)
- chr (36)
-
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - clear (12)
-
close
_ write (12) - codepoints (24)
- coerce (12)
- compile (12)
- concat (21)
- conj (12)
- conjugate (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (12)
- convert (12)
- count (12)
- crypt (12)
- ctime (12)
- curry (23)
- deconstruct (2)
- dedup (3)
- delete (36)
- delete! (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) - denominator (12)
-
destination
_ encoding _ name (24) - dev (12)
- dirname (12)
- disasm (24)
- disassemble (24)
- div (12)
- divmod (42)
- downcase (12)
- downcase! (12)
- dump (24)
- each (14)
-
each
_ byte (24) -
each
_ char (24) -
each
_ codepoint (24) -
each
_ grapheme _ cluster (16) -
each
_ line (24) - empty? (12)
- encode (36)
- encode! (24)
- encoding (12)
- end (7)
-
end
_ with? (12) - entries (43)
- eql? (24)
-
error
_ bytes (12) -
error
_ char (12) - escape (12)
-
eval
_ script (7) -
exclude
_ end? (7) - extname (12)
- fdiv (24)
- fetch (36)
- filename (12)
- finish (12)
- finite? (9)
- first (14)
- floor (12)
-
force
_ encoding (12) - format (12)
- friday? (12)
- ftype (24)
- getbyte (12)
- getc (24)
- getpriority (12)
- gets (84)
- getwd (12)
- glob (12)
-
global
_ variables (12) -
grant
_ privilege (24) -
grapheme
_ clusters (16) - gsub (72)
- gsub! (48)
- hash (19)
- hex (12)
- home (24)
- i (12)
- id2name (12)
- imag (24)
- imaginary (24)
- include? (12)
- index (19)
- infinite? (9)
- inherited (12)
-
inplace
_ mode (12) - insert (12)
-
insert
_ output (12) - inspect (399)
-
instance
_ methods (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) - integer? (12)
- intern (12)
- join (24)
- key (12)
- keys (12)
- label (24)
- last (14)
-
last
_ match (12) - length (12)
- lines (24)
- ljust (12)
- load (12)
-
load
_ from _ binary _ extra _ data (10) -
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (33) -
locale
_ charmap (12) - lstrip (12)
- lstrip! (12)
- magnitude (24)
- match (24)
- match? (9)
-
method
_ defined? (12) - methods (12)
-
module
_ function (12) - modulo (24)
- name (39)
- name= (10)
-
name
_ list (12) -
named
_ captures (12) - names (36)
- negative? (10)
- new (69)
- next (12)
- next! (12)
- nonzero? (12)
- numerator (12)
- oct (12)
- of (3)
- ord (12)
-
original
_ name (24) - pack (21)
- parse (10)
-
parse
_ file (3) - partition (12)
- path (102)
- phase (12)
- pipe (48)
- polar (24)
- positive? (10)
-
post
_ match (12) - pow (12)
-
pre
_ match (12) - pread (8)
- prepend (21)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - print (36)
- printf (48)
- priority (12)
- priority= (12)
- private (75)
-
private
_ call? (9) -
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) - protected (12)
-
protected
_ instance _ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (12) - public (17)
-
public
_ instance _ methods (12) -
public
_ method _ defined? (12) -
public
_ methods (12) - putback (24)
- pwd (12)
- pwrite (8)
- quo (12)
- quote (12)
-
raw
_ seed (2) - read (72)
-
read
_ nonblock (24) -
readagain
_ bytes (12) - readchar (24)
- readline (84)
- readlines (84)
- readlink (12)
- readpartial (24)
- real (24)
- real? (12)
- realdirpath (12)
- realpath (12)
- rect (24)
- rectangular (24)
- remainder (24)
-
remove
_ class _ variable (12) -
remove
_ instance _ variable (12) - replace (12)
- replacement (12)
- replacement= (12)
-
respond
_ to _ missing? (12) - result (12)
- reverse (12)
- reverse! (12)
- rid (24)
- rindex (48)
- rjust (12)
- round (12)
- rpartition (12)
- rstrip (12)
- rstrip! (12)
- scan (24)
- scrub (36)
- scrub! (36)
- select (24)
-
set
_ backtrace (12) - setbyte (12)
- setpriority (12)
- setproctitle (12)
- setregid (12)
- setresgid (12)
- setresuid (12)
- setreuid (12)
- shift (12)
- signal (10)
- signame (12)
- signm (12)
-
singleton
_ methods (12) - size (19)
- slice (132)
- slice! (72)
- source (12)
-
source
_ location (43) - split (31)
- sprintf (12)
- squeeze (12)
- squeeze! (12)
-
start
_ with? (12) - stat (12)
- status (12)
- step (107)
- store (12)
- strftime (12)
- string (12)
- strip (12)
- strip! (12)
- sub (60)
- sub! (36)
- succ (12)
- succ! (12)
- sum (12)
- swapcase (12)
- swapcase! (12)
- sysread (12)
- syswrite (12)
-
thread
_ variable? (12) -
thread
_ variable _ get (12) -
thread
_ variable _ set (12) -
to
_ a (43) -
to
_ binary (10) -
to
_ c (24) -
to
_ f (12) -
to
_ i (12) -
to
_ int (12) -
to
_ path (27) -
to
_ r (12) -
to
_ s (367) -
to
_ str (24) -
to
_ sym (12) -
to
_ write _ io (12) - tr (12)
- tr! (12)
-
tr
_ s (12) -
tr
_ s! (12) -
trace
_ var (12) - trap (48)
- truncate (12)
-
try
_ convert (12) - undump (8)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
- unpack1 (9)
-
untrace
_ var (12) - upcase (12)
- upcase! (12)
- upto (12)
- urandom (8)
-
valid
_ encoding? (12) - values (12)
-
values
_ at (24) -
verify
_ compaction _ references (6) - wait (10)
-
world
_ writable? (36) - writable? (36)
-
writable
_ real? (36) - write (48)
-
write
_ nonblock (12) - zero? (12)
- zone (12)
検索結果
先頭5件
-
Process
. # setpriority(which , who , prio) -> 0 (12302.0) -
プロセス、プロセスグループ、 ユーザのいずれかの現在のプライオリティを設定します 。プライオリティの設定に成功した場合は 0 を返します。
...れかで指定します。
* Process::PRIO_PROCESS
* Process::PRIO_PGRP
* Process::PRIO_USER
@param who which の値にしたがってプロセス ID、プロセスグループ ID、ユーザ ID のいずれかを整数で指定します。
@param prio プライオリティを -20 から 20......身のプライオリティを 10 に下げます。
すでに 10 よりもプライオリティが低く、
Errno::EACCES となった場合には無視して実行を続けます。
begin
Process.setpriority(Process::PRIO_PROCESS, 0, 10)
rescue Errno::EACCES
end
@see setpriority(2)... -
Encoding
:: Converter # primitive _ errinfo -> Array (12202.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
...直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
@return [result, enc1, enc2, error_bytes, readagain_bytes] という五要素の配列
result は直前の primitive_convert の戻り値です。
それ以外の四要素は......たバイト列、readagain_bytes は先読みによって変換器内部に保持されているバイト列です。
primitive_errinfo はもっぱら Encoding::Converter#primitive_convert と組み合わせて使います。Encoding::Converter#convert を用いている場合にも取得する......ew("EUC-JP", "Shift_JIS")
ec.primitive_convert(src="\xff", dst="", nil, 10)
p ec.primitive_errinfo
#=> [:invalid_byte_sequence, "EUC-JP", "Shift_JIS", "\xFF", ""]
# HIRAGANA LETTER A (\xa4\xa2 in EUC-JP) is not representable in ISO-8859-1.
# Since this error is occur in UTF-8 to ISO-8859-1 conversi... -
Process
. # getpriority(which , who) -> Integer (12202.0) -
which に従いプロセス、プロセスグループ、ユーザのいずれかの現在のプライオリティを整数で返します。
...を整数で返します。
@param which プライオリティの種類を次の定数で指定します。 Process::PRIO_PROCESS,
Process::PRIO_PGRP, Process::PRIO_USER。
@param who which の値にしたがってプロセス ID、プロセスグループ ID、ユーザ ID のいず......れかを整数で指定します。
@raise Errno::EXXX プライオリティの取得に失敗した場合に発生します。
@raise NotImplementedError メソッドが現在のプラットフォームで実装されていない場合に発生します。
@see getpriority(2)... -
Thread
# priority -> Integer (12202.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
...レッドの
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b =......Thread.new do
loop { count2 += 1 }
end
b.priority = -2
count1 = count2 = 0 # reset
sleep 1 # => 1
count1 # => 13809431
count2 # => 11571921
//}... -
Thread
# priority=(val) (12202.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
...レッドの
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b =......Thread.new do
loop { count2 += 1 }
end
b.priority = -2
count1 = count2 = 0 # reset
sleep 1 # => 1
count1 # => 13809431
count2 # => 11571921
//}... -
String
# lstrip -> String (9202.0) -
文字列の先頭にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v\0" です。
...にある空白文字を全て取り除いた新しい文字列を返します。
空白文字の定義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
p " abc\n".lstrip #=> "abc\n"
p "\t abc\n".lstrip #=> "abc\n"
p "abc\n".lstrip #=> "abc\n"
//}
@see String#strip, String#rstrip... -
String
# rstrip -> String (9202.0) -
文字列の末尾にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v\0" です。
...abc\n".rstrip #=> " abc"
p " abc \t\r\n\0".rstrip #=> " abc"
p " abc".rstrip #=> " abc"
p " abc\0 ".rstrip #=> " abc"
str = "abc\n"
p str.rstrip #=> "abc"
p str #=> "abc\n" (元の文字列は変化しない)
//}
@see String#lstrip,String#strip... -
String
# strip -> String (9202.0) -
文字列先頭と末尾の空白文字を全て取り除いた文字列を生成して返します。 空白文字の定義は " \t\r\n\f\v\0" です。
...trip #=> "abc"
p "abc\n".strip #=> "abc"
p " abc".strip #=> "abc"
p "abc".strip #=> "abc"
p " \0 abc \0".strip #=> "abc"
str = "\tabc\n"
p str.strip #=> "abc"
p str #=> "\tabc\n" (元の文字列は変化しない)
//}
@see Strin......g#lstrip, String#rstrip... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (9102.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...または正規表現で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。......mlist[String#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex("in......{
'foo'.byterindex('f') # => 0
'foo'.byterindex('o') # => 2
'foo'.byterindex('oo') # => 1
'foo'.byterindex('ooo') # => nil
'foo'.byterindex(/f/) # => 0
'foo'.byterindex(/o/) # => 2
'foo'.byterindex(/oo/) # => 1
'foo'.byterindex(/ooo/) # => nil
# 右でのマッチが優先
'foo'.byterindex(/o+/) #... -
String
# lstrip! -> self | nil (9102.0) -
文字列の先頭にある空白文字を全て破壊的に取り除きます。 空白文字の定義は " \t\r\n\f\v\0" です。
..." \t\r\n\f\v\0" です。
lstrip! は self を変更して返します。
ただし取り除く空白がなかったときは nil を返します。
//emlist[例][ruby]{
str = " abc"
p str.lstrip! # => "abc"
p str # => "abc"
str = "abc"
p str.lstrip! # => nil
p str # =>...