種類
ライブラリ
- English (10)
- ビルトイン (1651)
- abbrev (2)
- base64 (2)
- benchmark (6)
- bigdecimal (34)
-
bigdecimal
/ ludcmp (1) -
bigdecimal
/ math (6) -
bigdecimal
/ util (4) -
cgi
/ core (1) - coverage (3)
- csv (65)
- date (4)
- digest (8)
- erb (11)
- etc (8)
- fiddle (11)
-
fiddle
/ import (4) - fileutils (36)
-
io
/ wait (2) -
irb
/ cmd / help (1) -
irb
/ cmd / load (3) -
irb
/ context (3) -
irb
/ xmp (2) - json (39)
-
json
/ add / bigdecimal (1) -
json
/ add / complex (1) -
json
/ add / date (1) -
json
/ add / date _ time (2) -
json
/ add / exception (2) -
json
/ add / range (1) -
json
/ add / rational (1) -
json
/ add / regexp (1) -
json
/ add / struct (1) -
json
/ add / time (2) - kconv (2)
- logger (25)
- matrix (88)
- mkmf (10)
- monitor (6)
-
net
/ http (60) - nkf (1)
- objspace (8)
- open-uri (8)
- open3 (1)
- openssl (92)
- optparse (56)
- pathname (33)
- pp (5)
- prettyprint (1)
- prime (14)
- psych (20)
- pty (1)
- rake (43)
-
rake
/ packagetask (6) -
rake
/ testtask (1) - rbconfig (4)
-
rbconfig
/ sizeof (2) -
rdoc
/ known _ classes (1) -
rdoc
/ parser / ruby (2) - readline (1)
- resolv (4)
- rexml (1)
-
rexml
/ document (69) -
rexml
/ streamlistener (1) - ripper (9)
-
ripper
/ filter (3) -
ripper
/ lexer (7) -
ripper
/ sexp (2) - rubygems (6)
-
rubygems
/ config _ file (2) -
rubygems
/ custom _ require (1) -
rubygems
/ defaults (1) -
rubygems
/ gem _ path _ searcher (1) -
rubygems
/ installer (4) -
rubygems
/ platform (1) -
rubygems
/ requirement (16) -
rubygems
/ source _ index (2) -
rubygems
/ specification (9) -
rubygems
/ version (13) - securerandom (1)
- set (19)
- socket (14)
- stringio (27)
- strscan (42)
-
syslog
/ logger (1) - timeout (2)
- tsort (12)
- un (4)
- uri (15)
-
webrick
/ httprequest (1) -
webrick
/ httpservlet / cgihandler (1) -
webrick
/ ssl (2) - win32ole (20)
- zlib (3)
クラス
-
ARGF
. class (19) - Addrinfo (6)
- Array (139)
- BasicObject (14)
- BasicSocket (3)
-
Benchmark
:: Tms (1) - BigDecimal (31)
- Binding (6)
- CGI (1)
- CSV (35)
-
CSV
:: FieldInfo (3) -
CSV
:: Row (13) -
CSV
:: Table (12) - Class (2)
- Complex (37)
- Coverage (3)
- Date (5)
- DateTime (2)
-
Digest
:: Base (7) - Dir (53)
- ERB (7)
- Encoding (17)
-
Encoding
:: Converter (22) -
Encoding
:: InvalidByteSequenceError (2) -
Encoding
:: UndefinedConversionError (1) - Enumerator (10)
-
Enumerator
:: Chain (1) -
Enumerator
:: Lazy (26) -
Enumerator
:: Yielder (3) - Exception (15)
- FalseClass (2)
- Fiber (9)
-
Fiddle
:: CStruct (1) -
Fiddle
:: Closure :: BlockCaller (1) -
Fiddle
:: Function (1) -
Fiddle
:: Pointer (3) - File (50)
-
File
:: Stat (43) - Float (23)
- FrozenError (2)
-
Gem
:: ConfigFile (2) -
Gem
:: GemPathSearcher (1) -
Gem
:: Installer (4) -
Gem
:: Platform (1) -
Gem
:: Requirement (16) -
Gem
:: SourceIndex (2) -
Gem
:: Specification (9) -
Gem
:: Version (13) - Hash (50)
- IO (72)
- IPSocket (1)
-
IRB
:: Context (3) -
IRB
:: ExtendCommand :: Help (1) -
IRB
:: ExtendCommand :: Load (1) -
IRB
:: ExtendCommand :: Require (1) -
IRB
:: ExtendCommand :: Source (1) - Integer (75)
-
JSON
:: Parser (2) -
JSON
:: State (11) - KeyError (2)
- Logger (25)
- MatchData (19)
- Matrix (76)
-
Matrix
:: LUPDecomposition (1) - Method (10)
- Module (60)
- Monitor (5)
-
Net
:: HTTP (23) -
Net
:: HTTPGenericRequest (6) -
Net
:: HTTPResponse (9) - NilClass (15)
- Numeric (49)
- Object (58)
-
OpenSSL
:: ASN1 :: BMPString (2) -
OpenSSL
:: ASN1 :: BitString (2) -
OpenSSL
:: ASN1 :: Boolean (1) -
OpenSSL
:: ASN1 :: Enumerated (1) -
OpenSSL
:: ASN1 :: GeneralString (2) -
OpenSSL
:: ASN1 :: GeneralizedTime (2) -
OpenSSL
:: ASN1 :: GraphicString (2) -
OpenSSL
:: ASN1 :: IA5String (2) -
OpenSSL
:: ASN1 :: ISO64String (2) -
OpenSSL
:: ASN1 :: Integer (2) -
OpenSSL
:: ASN1 :: Null (1) -
OpenSSL
:: ASN1 :: NumericString (2) -
OpenSSL
:: ASN1 :: OctetString (2) -
OpenSSL
:: ASN1 :: PrintableString (2) -
OpenSSL
:: ASN1 :: Sequence (1) -
OpenSSL
:: ASN1 :: Set (1) -
OpenSSL
:: ASN1 :: T61String (2) -
OpenSSL
:: ASN1 :: UTCTime (2) -
OpenSSL
:: ASN1 :: UTF8String (2) -
OpenSSL
:: ASN1 :: UniversalString (2) -
OpenSSL
:: ASN1 :: VideotexString (2) -
OpenSSL
:: BN (14) - OptionParser (49)
- PP (3)
- Pathname (33)
- PrettyPrint (1)
- Prime (4)
-
Prime
:: EratosthenesGenerator (3) -
Prime
:: PseudoPrimeGenerator (4) - Proc (7)
-
Psych
:: ScalarScanner (1) -
Psych
:: Stream (2) -
Psych
:: Visitors :: YAMLTree (2) -
RDoc
:: Parser :: Ruby (2) -
REXML
:: Attribute (3) -
REXML
:: Attributes (13) -
REXML
:: CData (3) -
REXML
:: DocType (9) -
REXML
:: Document (5) -
REXML
:: Element (16) -
REXML
:: Elements (6) -
REXML
:: Entity (2) -
REXML
:: Instruction (2) -
REXML
:: Text (4) -
REXML
:: XPath (3) -
Rake
:: Application (5) -
Rake
:: FileList (17) -
Rake
:: FileTask (2) -
Rake
:: InvocationChain (4) -
Rake
:: PackageTask (6) -
Rake
:: TaskArguments (2) -
Rake
:: TestTask (1) - Random (9)
- Range (27)
- Rational (29)
- Refinement (1)
- Regexp (23)
- Resolv (2)
-
Resolv
:: DNS (1) -
Resolv
:: DNS :: Name (1) - Ripper (15)
-
Ripper
:: Filter (3) -
Ripper
:: Lexer (3) - RubyVM (3)
-
RubyVM
:: AbstractSyntaxTree :: Node (6) -
RubyVM
:: InstructionSequence (20) - Set (19)
- SignalException (5)
- Socket (4)
- String (179)
- StringIO (27)
- StringScanner (42)
- Struct (16)
- Symbol (7)
-
Syslog
:: Logger (1) - Thread (17)
-
Thread
:: Backtrace :: Location (7) -
Thread
:: ConditionVariable (2) -
Thread
:: Mutex (2) -
Thread
:: Queue (5) -
Thread
:: SizedQueue (5) - ThreadGroup (1)
- Time (76)
- TracePoint (20)
- TrueClass (2)
-
URI
:: FTP (1) -
URI
:: MailTo (3) - UnboundMethod (9)
- UncaughtThrowError (1)
- Vector (11)
-
WEBrick
:: GenericServer (1) -
WEBrick
:: HTTPRequest (1) -
WEBrick
:: HTTPServlet :: CGIHandler (1) - WIN32OLE (6)
-
WIN32OLE
_ EVENT (2) -
WIN32OLE
_ METHOD (1) -
WIN32OLE
_ TYPE (4) -
WIN32OLE
_ TYPELIB (1) -
WIN32OLE
_ VARIANT (3) - XMP (1)
-
Zlib
:: GzipWriter (2)
モジュール
- Abbrev (1)
- Base64 (2)
- Benchmark (5)
- BigMath (8)
- Comparable (2)
- Digest (1)
-
ERB
:: Util (4) - Enumerable (94)
- Etc (7)
- Fiddle (6)
-
Fiddle
:: Importer (3) - FileTest (15)
- FileUtils (36)
- GC (8)
-
GC
:: Profiler (4) - Gem (6)
- JSON (13)
-
JSON
:: Generator :: GeneratorMethods :: Array (1) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (1) -
JSON
:: Generator :: GeneratorMethods :: Float (1) -
JSON
:: Generator :: GeneratorMethods :: Hash (1) -
JSON
:: Generator :: GeneratorMethods :: Integer (1) -
JSON
:: Generator :: GeneratorMethods :: NilClass (1) -
JSON
:: Generator :: GeneratorMethods :: Object (1) -
JSON
:: Generator :: GeneratorMethods :: String (1) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (1) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (1) - Kconv (1)
- Kernel (152)
- LUSolve (1)
- Marshal (6)
- Math (6)
- MonitorMixin (1)
-
Net
:: HTTPExceptions (1) -
Net
:: HTTPHeader (21) - ObjectSpace (15)
- Open3 (1)
- OpenSSL (1)
-
OpenSSL
:: ASN1 (39) -
OpenURI
:: Meta (8) -
OptionParser
:: Arguable (7) - PTY (1)
- Process (8)
- Psych (11)
- RDoc (1)
-
REXML
:: Security (1) -
REXML
:: StreamListener (1) - Rake (3)
-
Rake
:: TaskManager (8) - RakeFileUtils (2)
- RbConfig (6)
- Readline (1)
-
RubyVM
:: AbstractSyntaxTree (2) -
RubyVM
:: MJIT (3) - SecureRandom (1)
- Signal (2)
- TSort (12)
- Timeout (2)
- URI (11)
-
WEBrick
:: Config (1) -
WIN32OLE
:: VARIANT (3) - Warning (1)
- Zlib (1)
キーワード
- ! (1)
- != (1)
-
$ $ (1) -
$ & (1) -
$ & # 39; (1) -
$ * (1) -
$ , (1) -
$ -0 (1) -
$ -F (1) -
$ -I (1) -
$ -v (1) -
$ -w (1) -
$ . (1) -
$ / (1) -
$ 0 (1) -
$ 1 (1) -
$ 10 (1) -
$ 11 (1) -
$ 2 (1) -
$ 3 (1) -
$ 4 (1) -
$ 5 (1) -
$ 6 (1) -
$ 7 (1) -
$ 8 (1) -
$ 9 (1) -
$ : (1) -
$ ; (1) -
$ > (1) -
$ ARGV (1) -
$ CHILD _ STATUS (1) -
$ DEFAULT _ INPUT (1) -
$ INPUT _ LINE _ NUMBER (1) -
$ LAST _ MATCH _ INFO (1) -
$ LAST _ PAREN _ MATCH (1) -
$ LAST _ READ _ LINE (1) -
$ LOAD _ PATH (1) -
$ NR (1) -
$ ORS (1) -
$ OUTPUT _ RECORD _ SEPARATOR (1) -
$ PROGRAM _ NAME (1) -
$ VERBOSE (1) -
$ _ (1) -
$ ` (1) -
$ archdir (1) -
$ hdrdir (1) -
$ libdir (1) -
$ sitearchdir (1) -
$ sitelibdir (1) -
$ srcdir (1) -
$ stdin (1) -
$ stdout (1) -
$ topdir (1) -
$ ~ (1) - % (5)
- & (2)
- * (7)
- ** (3)
- + (6)
- +@ (2)
- - (5)
- -@ (4)
-
/ (3) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (1) - < (2)
- << (6)
- <= (2)
- <=> (15)
- == (10)
- === (6)
- =~ (5)
- >= (2)
- >> (1)
- ARGV (1)
- BMPString (2)
-
BUILD
_ RUBY _ PLATFORM (1) - BigDecimal (2)
- BitString (2)
- Boolean (1)
-
CESU
_ 8 (1) - CONFIG (1)
- Complex (2)
- DATA (1)
- DEBUG (1)
-
DEFAULT
_ PARAMS (1) - E (1)
- Entity (1)
- Enumerated (1)
- FORMAT (2)
- Float (1)
- GeneralString (2)
- GeneralizedTime (2)
- GraphicString (2)
- IA5String (2)
-
INSTRUCTION
_ NAMES (1) - ISO64String (2)
- Integer (3)
- JSON (1)
-
KNOWN
_ CLASSES (1) -
LEVEL
_ MAP (1) - LIMITS (1)
-
MAJOR
_ VERSION (1) -
MINOR
_ VERSION (1) - Marshal フォーマット (1)
-
NEWS for Ruby 3
. 0 . 0 (1) - NKF (1)
- Null (1)
- Numeric (1)
- NumericString (2)
-
OPERATING
_ SYSTEM _ DEFAULTS (1) - OPS (1)
- OPTS (1)
- ObjectId (2)
- OctetString (2)
- PI (2)
-
PLATFORM
_ DEFAULTS (1) - ParseException (1)
- PrintableString (2)
-
RUBY
_ COPYRIGHT (1) -
RUBY
_ DESCRIPTION (1) -
RUBY
_ ENGINE (1) -
RUBY
_ ENGINE _ VERSION (1) -
RUBY
_ FREE (1) -
RUBY
_ PATCHLEVEL (1) -
RUBY
_ PLATFORM (1) -
RUBY
_ RELEASE _ DATE (1) -
RUBY
_ REVISION (1) -
RUBY
_ VERSION (1) - Rational (1)
- Requirement (1)
- Ruby (1)
- RubyGemsPackageVersion (1)
- RubyGemsVersion (1)
- Rubyの起動 (1)
-
SCRIPT
_ LINES _ _ (1) -
SHIFT
_ JIS (1) - SINGLE (1)
- SIZEOF (1)
- SSL (1)
- STDERR (1)
- STDIN (1)
- STDOUT (1)
- Sequence (1)
- Set (1)
-
Shift
_ JIS (1) - String (1)
- T61String (2)
- TOPDIR (1)
- TracePoint (1)
- Transitive (1)
- TreeBuilder (1)
- UTCTime (2)
- UTF8String (2)
- UndefinedConversionError (1)
- UniversalString (2)
- VERSION (2)
-
VT
_ BSTR (1) -
VT
_ DATE (1) -
VT
_ DISPATCH (1) - Version (1)
- VideotexString (2)
-
WIN
_ PATTERNS (1) - YAMLTree (1)
- [] (35)
- []= (1)
- ^ (2)
-
_ _ callee _ _ (1) -
_ _ id _ _ (1) -
_ _ method _ _ (1) -
_ _ send _ _ (2) -
_ dump (2) -
_ id2ref (1) - ` (1)
- abbrev (2)
-
abort
_ on _ exception (2) - abs (5)
- abs2 (2)
-
absolute
_ path (3) -
absolute
_ path? (1) - accept (2)
- add (3)
- add? (1)
-
add
_ attribute (2) -
add
_ attributes (1) -
add
_ dependency (1) -
add
_ development _ dependency (1) -
add
_ element (1) -
add
_ field (1) -
add
_ namespace (1) -
add
_ runtime _ dependency (1) - adjugate (1)
- advise (1)
-
alias
_ method (1) - aliases (1)
- alive? (1)
- all? (2)
- allbits? (1)
-
allocation
_ sourcefile (1) -
allocation
_ sourceline (1) - alphanumeric (1)
- angle (1)
-
angle
_ with (1) - antisymmetric? (1)
- any? (2)
- anybits? (1)
- append (2)
- application (1)
- application= (1)
- arg (1)
-
arg
_ config (1) - argv0 (1)
- arity (3)
- array (1)
-
array
_ nl (1) -
as
_ list (1) - ascend (1)
-
ascii
_ compatible? (1) -
asciicompat
_ encoding (2) - asctime (1)
- asin (1)
- assoc (2)
- at (7)
-
at
_ exit (1) - atan (1)
- atime (4)
-
attr
_ writer (1) - attribute (1)
-
attribute
_ of (1) -
attributes
_ of (1) - autoclose? (1)
- autoload (2)
- autoload? (2)
- b (1)
- backtrace (2)
-
backtrace
_ locations (3) -
base
_ label (2) -
base
_ uri (1) - basename (2)
-
basic
_ auth (1) - basis (1)
- begin (2)
-
beginning
_ of _ line? (1) - benchmark (1)
- between? (1)
- bigdecimal (1)
- bind (2)
-
bind
_ call (2) - binding (3)
- binmode (2)
- binread (2)
- binwrite (1)
- birthtime (2)
-
bit
_ length (1) -
bit
_ set? (1) - blksize (1)
-
block
_ given? (1) - blockdev? (1)
- blocks (1)
- bm (1)
- bmbm (1)
- body (2)
-
body
_ permitted? (1) -
body
_ stream (1) - bol? (1)
- broadcast (1)
- bsearch (4)
-
bsearch
_ index (2) - build (2)
- bump (1)
- bytes (4)
- bytesize (1)
- byteslice (3)
- call (1)
-
callee
_ id (1) - caller (3)
-
caller
_ locations (2) - canonname (1)
- capitalize (1)
- capitalize! (1)
- captures (1)
- casecmp (2)
- casecmp? (2)
- catch (2)
- cause (1)
- cd (2)
- ceil (7)
- center (1)
- cgi (1)
-
cgi
/ session (1) - chain (1)
- chardev? (1)
- charpos (1)
- chars (2)
- charset (2)
- chdir (6)
- check (2)
-
check
_ circular? (1) -
check
_ until (1) - children (5)
- chmod (2)
-
chmod
_ R (1) - chomp (2)
- chomp! (1)
- chop (2)
- chop! (1)
- chown (4)
-
chown
_ R (1) - chr (3)
- chroot (1)
- chunk (1)
-
chunk
_ while (1) - civil (1)
- clamp (1)
-
class
_ eval (1) -
class
_ variable _ defined? (1) -
class
_ variable _ get (1) -
class
_ variable _ set (1) -
class
_ variables (1) - classify (1)
- cleanpath (1)
- clear (2)
-
clear
_ bit! (1) -
clear
_ exclude (1) - clone (1)
- close (5)
-
close
_ read (1) -
close
_ write (1) - closed? (2)
- cmp (1)
- code (1)
- codepage (1)
- codepoints (2)
- coerce (5)
-
cofactor
_ expansion (1) -
col
_ sep (1) - collect (5)
- collect! (4)
-
collect
_ concat (3) -
collect
_ method (1) - column (2)
-
column
_ vectors (1) - columns (1)
- combination (2)
- combine (2)
- commands (1)
- compact! (2)
-
compare
_ by _ identity (1) -
compare
_ by _ identity? (1) -
compare
_ file (1) - compatible? (1)
- compile (2)
-
compile
_ error (1) -
compile
_ file (1) -
compile
_ option (1) - component (1)
- concat (4)
- configure (1)
- confstr (1)
- conj (3)
- conjugate (3)
-
connect
_ from (2) -
const
_ defined? (1) -
const
_ get (1) -
const
_ load (1) -
const
_ source _ location (1) - constants (1)
- content (1)
-
content
_ encoding (1) -
content
_ length (1) -
content
_ range (1) -
content
_ type (2) - convert (1)
- convpath (1)
- copy (1)
-
copy
_ stream (2) - correct? (1)
- cos (1)
- count (8)
-
count
_ nodes (1) -
count
_ objects _ size (1) -
count
_ tdata _ objects (1) - covector (1)
- cp (1)
-
cp
_ r (1) - create (2)
-
create
_ id (1) -
create
_ makefile (1) - crypt (1)
- ctime (5)
- current (1)
- curry (2)
- cycle (4)
-
datetime
_ format (1) - day (1)
- debug (3)
-
decode
_ www _ form _ component (1) -
def
_ method (1) - default (3)
-
default
_ argv (1) -
default
_ event _ sources (1) -
default
_ external (1) -
default
_ proc (1) -
define
_ finalizer (2) -
define
_ method (2) -
define
_ singleton _ method (2) -
define
_ task (1) -
defined
_ class (1) - delete (12)
- delete! (1)
- delete? (1)
-
delete
_ all (1) -
delete
_ at (1) -
delete
_ attribute (1) -
delete
_ if (10) -
delete
_ prefix (1) -
delete
_ prefix! (1) -
delete
_ suffix (1) -
delete
_ suffix! (1) - denominator (4)
- deq (1)
- descend (1)
-
destination
_ encoding (1) - det (1)
- detect (2)
- determinant (1)
- dev (1)
-
dev
_ major (1) -
dev
_ minor (1) - diagonal (1)
- difference (2)
- dig (3)
- digest (1)
- digest! (1)
- digits (2)
- directory? (1)
- dirname (2)
- disable (3)
- disasm (2)
- disassemble (2)
- disjoint? (1)
- display (1)
- div (2)
- divide (2)
- divmod (3)
- dlunwrap (1)
- dlwrap (1)
-
do
_ not _ reverse _ lookup (1) -
double
_ fig (1) - downcase (1)
- downcase! (1)
- downto (2)
-
drop
_ while (5) - dst? (1)
- dummy? (1)
- dump (6)
-
dump
_ stream (1) - dup (1)
- each (22)
-
each
_ attribute (1) -
each
_ byte (6) -
each
_ capitalized _ name (1) -
each
_ char (4) -
each
_ child (8) -
each
_ codepoint (6) -
each
_ cons (1) -
each
_ element _ with _ attribute (1) -
each
_ element _ with _ text (1) -
each
_ entry (1) -
each
_ filename (1) -
each
_ grapheme _ cluster (2) -
each
_ index (2) -
each
_ line (12) -
each
_ object (2) -
each
_ pair (6) -
each
_ slice (2) -
each
_ strongly _ connected _ component (3) -
each
_ strongly _ connected _ component _ from (4) -
each
_ with _ index (6) -
each
_ with _ object (2) - eigen (1)
- eigensystem (1)
- element (1)
-
elements
_ to _ i (1) - empty (1)
- empty? (4)
- enable (2)
- enabled? (1)
- encode (3)
- encode! (2)
- encode64 (1)
-
encode
_ www _ form _ component (1) - encoding (4)
- end (1)
-
end
_ seen? (1) -
end
_ with? (2) - enter (1)
- entities (1)
- entity (2)
-
entity
_ expansion _ limit (1) -
entity
_ expansion _ text _ limit (2) - entitydecl (1)
- entries (5)
-
entrywise
_ product (1) -
enum
_ for (2) - environment (1)
- eos? (1)
- eql? (6)
- equal? (1)
- error (2)
-
error
_ bytes (1) -
error
_ char (1) - escape (1)
- eval (3)
-
eval
_ script (1) - even? (1)
- event (1)
- exact? (1)
- exception (3)
-
excluded
_ from _ list? (1) - exec (4)
-
exec
_ format (1) - executable? (1)
-
executable
_ real? (2) - execute (4)
- exist? (2)
- existing (1)
- existing! (1)
- exists? (3)
- exit (2)
- exit! (1)
- exp (1)
- ext (1)
-
external
_ encoding (1) -
external
_ id (1) - extname (1)
- extract (4)
- fail (3)
-
family
_ addrinfo (2) -
fast
_ generate (1) -
fast
_ unparse (1) - fatal (2)
- fcntl (1)
- fdatasync (1)
- fdiv (3)
- feed (1)
- fetch (5)
- field (1)
- field? (1)
-
field
_ row? (1) -
field
_ size _ limit (1) - file (1)
- file? (1)
- filename (4)
- filename= (1)
- fileno (2)
- fill (6)
- filter (12)
- filter! (4)
-
filter
_ map (3) - find (3)
-
find
_ all (3) -
find
_ index (9) - finish (2)
- finite? (3)
- first (7)
-
first
_ column (1) -
first
_ lineno (2) -
fixed
_ encoding? (1) -
flat
_ map (3) - flatten (1)
- flatten! (2)
- flock (1)
- floor (7)
- flush (1)
- fnmatch (1)
- fnmatch? (1)
-
for
_ fd (1) -
force
_ encoding (1) - foreach (7)
- fork (2)
- format (2)
-
formatted
_ program _ filename (1) - formatter (1)
- free (1)
- frexp (1)
- friday? (1)
-
from
_ gems _ in (1) -
from
_ prime _ division (1) -
from
_ state (1) -
from
_ yaml (1) - ftype (2)
- gamma (1)
-
garbage
_ collect (2) - gcd (1)
- gcdlcm (1)
- gem (1)
- generate (2)
-
generate
_ line (1) - get (2)
- get2 (2)
-
get
_ attribute (1) -
get
_ attribute _ ns (1) -
get
_ byte (1) -
get
_ fields (1) -
get
_ print (2) -
get
_ text (1) - getaddress (2)
- getaddrinfo (1)
- getbyte (4)
- getc (2)
- getch (1)
- getgm (1)
- gethostname (1)
- getlocal (2)
- getlogin (1)
- getname (1)
- getopts (3)
- gets (5)
- getutc (1)
- getwd (1)
- gid (1)
- glob (5)
-
global
_ variables (1) - gm (2)
- gmt? (1)
-
gmt
_ offset (1) - gmtime (1)
- gmtoff (1)
-
grapheme
_ clusters (2) - grep (2)
-
grep
_ v (2) -
group
_ by (2) - groups (1)
- grpowned? (2)
- gsub (6)
- gsub! (5)
- h (1)
-
hadamard
_ product (1) - handler= (1)
- hash (10)
- head (1)
- head2 (2)
- header (2)
- headers (2)
- help (1)
- helpfile (1)
- hex (1)
- hexdigest (1)
- hexdigest! (1)
- hexencode (1)
- home (2)
- hour (1)
- hstack (2)
-
html
_ escape (1) -
http
_ version (1) - identical? (2)
- imag (3)
- imaginary (3)
- import (1)
-
import
_ methods (1) -
in
_ namespace (1) - include (2)
- include? (8)
- included (1)
-
included
_ modules (1) -
incomplete
_ input? (1) - indent (1)
- index (9)
- infinite? (3)
- info (2)
- info? (1)
- inherited (1)
- initialize (1)
-
initialize
_ copy (1) - inject (3)
- ino (1)
-
inplace
_ mode (1) - insert (2)
-
insert
_ output (1) - inspect (34)
- install (3)
-
install
_ rb (1) - instance (2)
-
instance
_ eval (2) -
instance
_ exec (1) -
instance
_ method (1) -
instance
_ methods (1) -
instance
_ of? (1) -
instance
_ variable _ defined? (1) -
instance
_ variable _ get (1) -
instance
_ variable _ set (1) -
instance
_ variables (1) -
instruction
_ sequence (1) -
int
_ from _ prime _ division (1) - integer? (2)
- intern (2)
-
internal
_ encoding (2) - intersect? (1)
- intersection (2)
- inv (1)
- inverse (1)
- invert (1)
- invkind (1)
- irb (1)
-
is
_ a? (2) - isatty (1)
- isdst (1)
- iseuc (1)
- isjis (1)
- iterator? (1)
- itself (1)
- j (1)
- jj (1)
- join (4)
-
json
_ create (4) -
keep
_ if (4) -
keyword
_ init? (1) -
kind
_ of? (2) - label (2)
-
laplace
_ expansion (1) - last (1)
-
last
_ column (1) -
last
_ comment (1) -
last
_ description (1) -
last
_ error (1) -
last
_ lineno (1) -
last
_ match (1) -
last
_ modified (1) -
last
_ status (1) -
latest
_ gc _ info (2) - lchmod (1)
- lchown (1)
- lcm (1)
- length (9)
- level (1)
- lex (2)
- lgamma (1)
-
lib
_ dirs _ for (1) - limit (1)
- line (1)
-
line
_ stub (1) - lineno (3)
- lines (2)
- link (2)
- list (3)
- ljust (1)
- ln (1)
-
ln
_ s (1) - load (5)
-
load
_ file (1) -
load
_ from _ binary (1) -
load
_ from _ binary _ extra _ data (1) -
load
_ specification (1) -
load
_ stream (2) - local (2)
-
local
_ address (1) -
local
_ variable _ defined? (1) -
local
_ variable _ get (1) -
local
_ variables (2) -
locale
_ charmap (1) - localtime (2)
- log (3)
- lookup (1)
- loop (1)
- lshift! (1)
- lstat (2)
- lstrip (1)
- lstrip! (1)
- lup (1)
-
lup
_ decomposition (1) - lusolve (1)
- magnitude (6)
-
main
_ type (1) - makedirs (1)
- malloc (1)
- map (5)
- map! (4)
-
marshal
_ dump (1) -
marshal
_ load (1) -
mask
_ bits! (1) - match (5)
- match? (2)
- matched (1)
- matched? (1)
-
matched
_ size (1) - matches? (1)
- max (7)
-
max
_ by (4) -
max
_ nesting (1) - mday (1)
- member? (3)
-
memsize
_ of (1) -
memsize
_ of _ all (1) - merge (1)
- method (2)
-
method
_ defined? (1) -
method
_ id (1) -
method
_ missing (1) -
method
_ undefined (1) - methods (1)
- min (13)
-
min
_ by (4) - minmax (6)
-
minmax
_ by (2) - minor (2)
- mkdir (3)
-
mkdir
_ p (1) - mkfifo (1)
- mkpath (1)
- mktime (2)
-
mod
_ inverse (1) - mode (3)
-
module
_ eval (1) -
module
_ function (3) - modulo (3)
- mon (1)
-
mon
_ enter (2) -
mon
_ exit (1) - monday? (1)
- month (1)
- mountpoint? (1)
- move (1)
- msg (1)
- mtime (3)
- mv (1)
- name (6)
- name= (1)
-
name
_ list (1) -
named
_ captures (1) - names (3)
- namespace (2)
- namespaces (2)
-
need
_ zip (1) - needed? (1)
- negative? (4)
- nesting (1)
- new (103)
-
new
_ seed (1) - next (3)
- next! (1)
-
next
_ element (1) - nil? (1)
- nlink (1)
- nobits? (1)
- none? (1)
- nonzero? (2)
- norm (1)
- normalize (1)
- now (1)
-
nowrite
_ flag (1) - nprocessors (1)
- nsec (1)
-
num
_ bits (1) -
num
_ bytes (1) -
num
_ waiting (1) - numerator (4)
-
object
_ id (1) -
object
_ nl (1) - oct (1)
- odd? (1)
- of (1)
- offset (2)
-
ole
_ classes (1) -
ole
_ query _ interface (1) - on (12)
-
on
_ head (1) -
on
_ tail (1) - open (16)
-
optparse
/ uri (1) - ord (2)
- order (4)
- order! (4)
-
original
_ dir (2) -
original
_ name (2) - owned? (2)
- pack (2)
- pack テンプレート文字列 (1)
-
package
_ dir (1) -
package
_ dir _ path (1) -
package
_ files (1) - parameters (1)
- parse (13)
- parse! (3)
-
parse
_ csv (1) -
parse
_ file (1) -
parse
_ line (1) - partition (3)
- path (9)
- pathconf (1)
- pathmap (1)
- pause (1)
- peek (1)
- peep (1)
- permutation (2)
- permute (2)
- permute! (2)
- phase (1)
- pid (1)
- pipe? (1)
- pipeline (1)
- pointer (1)
- polar (3)
- pop (2)
- pos (3)
- pos= (1)
- positive? (3)
- post (2)
- post2 (2)
-
post
_ match (2) - pow (2)
- pp (1)
-
pre
_ match (2) - pread (1)
- pred (1)
- prefix (1)
- prefixes (2)
- prepend (2)
- prerelease? (2)
-
pretty
_ generate (1) -
pretty
_ print (3) -
pretty
_ print _ cycle (1) -
pretty
_ unparse (1) - prime? (1)
-
prime
_ division (2) -
prime
_ fasttest? (1) -
primitive
_ convert (4) -
primitive
_ errinfo (1) - print (4)
- printf (3)
- priority (1)
- private (4)
-
private
_ class _ method (2) -
private
_ constant (1) -
private
_ instance _ methods (1) -
private
_ method _ defined? (1) - produce (1)
- product (2)
- progname (1)
-
program
_ name (1) -
prompt
_ mode (1) -
protected
_ method _ defined? (1) -
proxy
_ basic _ auth (1) -
psych
_ y (1) - public (5)
-
public
_ class _ method (2) -
public
_ constant (1) -
public
_ instance _ method (1) -
public
_ method (1) -
public
_ method _ defined? (1) -
public
_ send (2) - putback (2)
- putc (1)
- puts (3)
- pwd (1)
- pwrite (1)
- query (1)
- quo (3)
- quote (1)
-
quote
_ char (1) - r (1)
- raise (6)
-
raised
_ exception (1) - rakefile (1)
- rand (6)
- range (1)
-
range
_ length (1) - rank (1)
- rassoc (2)
- rationalize (9)
-
raw
_ data (1) - rdev (1)
-
rdev
_ major (1) -
rdev
_ minor (1) - rdoc (1)
-
reachable
_ objects _ from (1) - read (3)
-
read
_ body (1) - readable? (2)
-
readable
_ real? (1) - readbyte (3)
- readchar (2)
- readline (4)
- readlines (10)
- readlink (1)
- real (3)
- real? (3)
- realdirpath (1)
- realpath (3)
- realtime (1)
- receiver (3)
- rect (4)
- rectangular (4)
- reduce (3)
- refine (1)
- regexp (2)
- regular? (1)
- reject (9)
- reject! (7)
- relative? (1)
-
relative
_ path _ from (1) - release (2)
- remainder (3)
-
remote
_ address (1) - remove (1)
-
remove
_ class _ variable (1) -
remove
_ entry (1) -
remove
_ instance _ variable (1) - rename (1)
- reopen (5)
-
repeated
_ combination (2) -
repeated
_ permutation (2) - replace (1)
- replacement (1)
- replacement= (1)
- replicate (1)
- report (1)
-
report
_ on _ exception (1) -
report
_ on _ exception= (1) -
request
_ body _ permitted? (1) -
request
_ get (2) -
request
_ head (2) -
request
_ post (2) - require (2)
-
require
_ relative (1) -
required
_ ruby _ version (1) -
required
_ rubygems _ version (1) - reset (1)
- resolve (1)
-
respond
_ to? (1) -
respond
_ to _ missing? (1) - response (1)
-
response
_ body _ permitted? (1) - rest (1)
- rest? (1)
-
rest
_ size (1) - restore (2)
- restsize (1)
- result (2)
- resume (2)
-
return
_ value (1) - reverse (1)
- reverse! (1)
-
reverse
_ each (1) - rewind (4)
-
rexml
/ parsers / ultralightparser (1) - rindex (4)
- rjust (1)
- rm (1)
-
rm
_ r (1) - rmdir (3)
- round (9)
- row (2)
-
row
_ sep (1) -
row
_ vectors (1) - rows (1)
- rpartition (1)
- rshift! (1)
- rstrip (1)
- rstrip! (1)
- ruby (2)
-
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 3 feature (1) -
ruby 1
. 8 . 4 feature (1) -
ruby2
_ keywords (1) -
ruby
_ engine (1) -
rubygems
/ commands / environment _ command (1) -
rubygems
/ commands / generate _ index _ command (1) -
rubygems
_ version (1) - run (1)
- running? (1)
-
safe
_ load (2) - sample (2)
-
satisfied
_ by? (1) - saturday? (1)
- scalar (1)
- scan (3)
-
scan
_ full (1) -
scan
_ until (1) - scrub (3)
- scrub! (3)
-
search
_ convpath (1) -
search
_ full (1) - sec (1)
- seed (1)
- seek (1)
- select (9)
- select! (4)
- self (1)
-
send
_ request (1) - separator (1)
- seplist (1)
-
set
_ backtrace (1) -
set
_ bit! (1) -
set
_ debug _ output (1) -
set
_ encoding _ by _ bom (1) -
set
_ range (3) -
set
_ trace _ func (1) - setbyte (1)
- setgid? (2)
- setproctitle (1)
- setproperty (2)
- setuid? (2)
-
sev
_ threshold (1) - sexp (1)
-
sexp
_ raw (1) -
sharing
_ detection (1) - shift (6)
- sign (1)
- signal (1)
- signm (1)
- signo (1)
- sin (2)
-
singleton
_ class (1) -
singleton
_ class? (1) -
singleton
_ method (1) -
singleton
_ method _ added (1) -
singleton
_ method _ removed (1) -
singleton
_ method _ undefined (1) -
singleton
_ methods (1) - size (16)
- size? (2)
-
skew
_ symmetric? (1) - skip (2)
-
skip
_ blanks? (1) -
skip
_ until (1) - sleep (3)
- slice (12)
- slice! (9)
-
slice
_ after (4) -
slice
_ before (5) -
slice
_ when (2) - socket? (2)
- solve (1)
- sort (2)
- sort! (2)
-
sort
_ by (2) -
sort
_ by! (1) - source (2)
-
source
_ encoding (1) -
source
_ location (4) - space (1)
-
space
_ before (1) - spawn (4)
- specific? (1)
- split (6)
- sprintf (1)
- sprintf フォーマット (1)
- sqrt (2)
- squeeze (1)
- squeeze! (1)
- srand (2)
- src (1)
-
stand
_ alone? (1) - start (7)
-
start
_ with? (2) - stat (4)
- status (1)
- step (11)
- sticky? (2)
- stop (1)
- store (1)
- strftime (1)
- string (3)
- strip (1)
- strip! (1)
-
strongly
_ connected _ components (1) - struct (1)
- sub (5)
- sub! (4)
-
sub
_ type (1) -
subdomain
_ of? (1) - subsec (1)
- succ (3)
- succ! (1)
- sum (5)
- summarize (2)
-
summary
_ indent (1) -
summary
_ width (1) - sunday? (1)
-
super
_ method (1) - superclass (1)
- swapcase (1)
- swapcase! (1)
- symlink (2)
- symlink? (2)
- sync (1)
- synchronize (1)
-
synthesize
_ file _ task (1) - syscall (1)
- sysconf (1)
- sysconfdir (1)
- sysopen (1)
- system (5)
- systmpdir (1)
- syswrite (1)
- table (1)
- taint (1)
- tainted? (1)
-
take
_ while (6) - target (1)
- tcp (2)
- tell (2)
- terminate (1)
- test (2)
- text (1)
-
thread
_ variable _ set (1) - throw (1)
- thursday? (1)
- timeout (2)
- times (2)
-
to
_ a (11) -
to
_ ary (1) -
to
_ binary (1) -
to
_ bn (1) -
to
_ c (4) -
to
_ csv (3) -
to
_ d (4) -
to
_ enum (2) -
to
_ f (5) -
to
_ h (3) -
to
_ i (8) -
to
_ int (3) -
to
_ json (20) -
to
_ mailtext (1) -
to
_ path (2) -
to
_ proc (2) -
to
_ ptr (1) -
to
_ r (7) -
to
_ rfc822text (1) -
to
_ ruby (1) -
to
_ s (43) -
to
_ str (2) -
to
_ string (1) -
to
_ sym (1) -
to
_ value (1) - today (1)
-
token
_ match (1) - tokenize (3)
-
top
_ level _ tasks (1) -
total
_ time (1) - touch (1)
- tr (2)
-
tr
_ s (1) -
tr
_ s! (1) - trace (2)
-
trace
_ var (3) - transfer (1)
-
transform
_ keys (3) -
transform
_ keys! (3) -
transform
_ values (2) -
transform
_ values! (2) - trap (2)
- truncate (9)
-
try
_ convert (5) - tsort (2)
-
tsort
_ each (3) - tty? (1)
- tuesday? (1)
-
tv
_ nsec (1) -
tv
_ sec (1) -
tv
_ usec (1) - typelibs (1)
- u (1)
- uid (1)
- umask (2)
- uname (1)
- unbind (1)
-
unconverted
_ fields? (1) -
undefine
_ finalizer (1) - undump (1)
- ungetc (1)
-
unicode
_ normalize (1) -
unicode
_ normalize! (1) -
unicode
_ normalized? (1) - union (4)
- uniq (4)
- uniq! (2)
- unknown (2)
- unlink (3)
- unnormalize (1)
- unpack (1)
- unpack1 (1)
- unparse (1)
- unscan (1)
- unshift (1)
- untaint (1)
-
untrace
_ var (1) - upcase (1)
- upcase! (1)
- upto (3)
- uptodate? (1)
- urandom (1)
-
url
_ encode (1) -
urlsafe
_ encode64 (1) -
use
_ readline (1) -
use
_ readline? (1) - usec (1)
- using (2)
- utc (3)
- utc? (1)
-
utc
_ offset (1) - utime (1)
-
valid
_ encoding? (1) - value (4)
-
values
_ at (2) - ver (1)
-
verbose
_ flag (1) - version (2)
- vstack (2)
- wait (2)
- wait2 (1)
-
wait
_ for _ cond (1) -
wait
_ readable (1) -
wait
_ writable (1) - waitpid (1)
- waitpid2 (1)
- warn (5)
- warning (2)
- wday (1)
- wednesday? (1)
-
win
_ platform? (1) -
with
_ defaults (1) -
with
_ index (6) -
with
_ object (2) -
world
_ readable? (2) -
world
_ writable? (2) - writable? (2)
-
writable
_ real? (1) - write (5)
-
write
_ headers? (1) - xmp (1)
- xpath (1)
- y (1)
- yday (1)
- year (1)
- yield (3)
-
yield
_ self (2) - zero (3)
- zero? (4)
- zip (6)
- zone (1)
- | (2)
- ~ (2)
- 制御構造 (1)
- 正規表現 (1)
- 演算子式 (1)
検索結果
先頭5件
-
irb (80257.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロンプトが表れます。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def f... -
StringScanner
# beginning _ of _ line? -> bool (64219.0) -
スキャンポインタが行頭を指しているなら true を、 行頭以外を指しているなら false を返します。
スキャンポインタが行頭を指しているなら true を、
行頭以外を指しているなら false を返します。
行頭の定義は、文字列先頭かまたは \n の直後を指していることです。
文字列末尾は必ずしも行頭ではありません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new("test\nstring")
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
s.scan(/\n/)
s.bol? # => true
s.scan(/\w+/... -
Integer
# >(other) -> bool (63355.0) -
比較演算子。数値として大きいか判定します。
比較演算子。数値として大きいか判定します。
@param other 比較対象の数値
@return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 > 0 # => true
1 > 1 # => false
//} -
Encoding
:: InvalidByteSequenceError # incomplete _ input? -> bool (54955.0) -
エラー発生時に入力文字列が不足している場合に真を返します。
エラー発生時に入力文字列が不足している場合に真を返します。
つまり、マルチバイト文字列の途中で文字列が終わっている場合に
真を返します。これは後続の入力を追加することでエラーが
解消する可能性があることを意味します。
//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1z")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenc... -
Gem
:: Platform :: RUBY -> String (54952.0) -
Pure Ruby の Gem はバイナリファイルをビルドするために Gem::Specification#extensions を使用する可能性があります。
Pure Ruby の Gem はバイナリファイルをビルドするために Gem::Specification#extensions
を使用する可能性があります。 -
Numeric
# i -> Complex (54766.0) -
Complex(0, self) を返します。
Complex(0, self) を返します。
ただし、Complex オブジェクトでは利用できません。
//emlist[例][ruby]{
10.i # => (0+10i)
-10.i # => (0-10i)
(0.1).i # => (0+0.1i)
Rational(1, 2).i # => (0+(1/2)*i)
//} -
Module
# >(other) -> bool | nil (54727.0) -
比較演算子。 self が other の先祖である場合、true を返します。 self が other の子孫か同一クラスである場合、false を返します。
比較演算子。 self が other の先祖である場合、true を返します。
self が other の子孫か同一クラスである場合、false を返します。
継承関係にないクラス同士の比較では
nil を返します。
@param other 比較対象のモジュールやクラス
@raise TypeError other がクラスやモジュールではない場合に発生します。
@see Module#<
//emlist[例][ruby]{
module Awesome; end
module Included
include Awesome
end
module Prepended
... -
TracePoint
# binding -> Binding (46519.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
//} -
Encoding
:: Converter # destination _ encoding -> Encoding (46237.0) -
変換先のエンコーディングを返します。
変換先のエンコーディングを返します。
@return 変換先のエンコーディング
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "euc-jp")
ec.destination_encoding #=> #<Encoding:EUC-JP>
//} -
WIN32OLE
_ METHOD # invkind -> Integer (46219.0) -
メソッドの種類を示すINVOKEKIND列挙値を取得します。
メソッドの種類を示すINVOKEKIND列挙値を取得します。
ここで言うメソッドの種類というのは、OLEオートメーションクライアントの記
述言語がどのような形式でサーバ呼び出しを記述すべきかを指定した属性値で
す。
@return メソッドのINVOKEKINDを返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.invkind # => 1
INVOKE... -
REXML
:: Security . entity _ expansion _ text _ limit -> Integer (45919.0) -
実体参照の展開による文字列の増分(テキストのバイト数)の 最大値を指定します。
実体参照の展開による文字列の増分(テキストのバイト数)の
最大値を指定します。
展開によって増分値がこの値を越えると
例外を発生させ、処理を中断します。
実体参照の展開処理を使った DoS 攻撃に対抗するための
仕組みです。
デフォルトは 10240 (byte) です。
@see REXML::Document.entity_expansion_text_limit=,
http://www.ruby-lang.org/ja/news/2013/02/22/rexml-dos-2013-02-22/ -
OpenSSL
:: ASN1 . # PrintableString(value) -> OpenSSL :: ASN1 :: PrintableString -> OpenSSL :: ASN1 :: PrintableString (38467.0) -
ASN.1 の PrintableString 型の値を表現する Ruby のオブジェクトを 生成します。
ASN.1 の PrintableString 型の値を表現する Ruby のオブジェクトを
生成します。
OpenSSL::ASN1::PrintableString.new と同じです。
@param value ASN.1 値を表す Ruby のオブジェクト(文字列)
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLICIT もしくは :EXPLICIT)
@param tag_class タグクラス(:UNIVERSAL, :CONTEXT_SPECIFIC, :APPLICATION, :PRIVATE のいずれか) -
OpenSSL
:: ASN1 . # PrintableString(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: PrintableString (37867.0) -
ASN.1 の PrintableString 型の値を表現する Ruby のオブジェクトを 生成します。
ASN.1 の PrintableString 型の値を表現する Ruby のオブジェクトを
生成します。
OpenSSL::ASN1::PrintableString.new と同じです。
@param value ASN.1 値を表す Ruby のオブジェクト(文字列)
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLICIT もしくは :EXPLICIT)
@param tag_class タグクラス(:UNIVERSAL, :CONTEXT_SPECIFIC, :APPLICATION, :PRIVATE のいずれか) -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (37867.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param file ファイル名を文字列で指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::Instr... -
Kernel
. # binding -> Binding (37519.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 (37519.0) -
Proc オブジェクトが保持するコンテキストを Binding オブジェクトで返します。
Proc オブジェクトが保持するコンテキストを
Binding オブジェクトで返します。
//emlist[例][ruby]{
def fred(param)
proc {}
end
sample_proc = fred(99)
eval("param", sample_proc.binding) # => 99
//} -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (37519.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:... -
Object
:: RUBY _ ENGINE -> String (37378.0) -
Ruby処理系実装の種類を表す文字列。
Ruby処理系実装の種類を表す文字列。
例:
$ ruby-1.9.1 -ve 'p RUBY_ENGINE'
ruby 1.9.1p0 (2009-03-04 revision 22762) [x86_64-linux]
"ruby"
$ jruby -ve 'p RUBY_ENGINE'
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [i386-java]
"jruby" -
Enumerable
# find _ index {|obj| . . . } -> Integer | nil (37345.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
(1..10).find_index(11) #=> nil
(1..10).find_index(2) #=> 1
//}
ブロックが与えられた場合には、各要素を引数として先頭から順にブロックを実行し、
ブロックが真を返した最初の要素の位置を返します。
一つも真にならなかった場合は nil を返します。
/... -
Enumerable
# find _ index(val) -> Integer | nil (37345.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
(1..10).find_index(11) #=> nil
(1..10).find_index(2) #=> 1
//}
ブロックが与えられた場合には、各要素を引数として先頭から順にブロックを実行し、
ブロックが真を返した最初の要素の位置を返します。
一つも真にならなかった場合は nil を返します。
/... -
ARGF
. class # internal _ encoding -> Encoding | nil (37255.0) -
ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
ARGF から読み込んだ文字列の内部エンコーディングを返します。
内部エンコーディングが指定されていない場合は nil を返します。
まだ読み込み処理を始めていない場合は Encoding.default_external を返します。
ARGF.class#set_encoding で設定します。
例:
# $ ruby -Eutf-8 test.rb
# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('utf-8','ascii')
ARG... -
Array
# find _ index {|item| . . . } -> Integer | nil (37255.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数として順にブロックを実行し、
ブロックが真を返した最初... -
Array
# find _ index(val) -> Integer | nil (37255.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数として順にブロックを実行し、
ブロックが真を返した最初... -
Gem
. ruby _ engine -> String (37252.0) -
Ruby処理系実装の種類を表す文字列を返します。
Ruby処理系実装の種類を表す文字列を返します。 -
Gem
:: Specification # required _ ruby _ version -> Gem :: Requirement (37252.0) -
この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。
この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。 -
Object
:: RUBY _ ENGINE _ VERSION -> String (37252.0) -
Ruby処理系実装のバージョンを表す文字列。
Ruby処理系実装のバージョンを表す文字列。 -
Kernel
$ $ INPUT _ LINE _ NUMBER -> Integer (37237.0) -
$. の別名
$. の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
require "English"
File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb
ruby sample.rb a.txt
#=> 5 -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (37219.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 -
Gem
:: Specification # required _ rubygems _ version -> Gem :: Requirement (37201.0) -
この Gem パッケージを動作させるのに必要な RubyGems のバージョンを返します。
この Gem パッケージを動作させるのに必要な RubyGems のバージョンを返します。 -
Enumerable
# find _ index -> Enumerator (37045.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
(1..10).find_index(11) #=> nil
(1..10).find_index(2) #=> 1
//}
ブロックが与えられた場合には、各要素を引数として先頭から順にブロックを実行し、
ブロックが真を返した最初の要素の位置を返します。
一つも真にならなかった場合は nil を返します。
/... -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (36991.0) -
self に特異メソッド name を定義します。
self に特異メソッド name を定義します。
@param 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_me... -
Object
# define _ singleton _ method(symbol , method) -> Symbol (36991.0) -
self に特異メソッド name を定義します。
self に特異メソッド name を定義します。
@param 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_me... -
Fiddle
:: BUILD _ RUBY _ PLATFORM -> String (36970.0) -
ビルドに用いた ruby のプラットフォームを表す文字列。
ビルドに用いた ruby のプラットフォームを表す文字列。
通常、Object::RUBY_PLATFORM と同じ。 -
Object
:: RUBY _ DESCRIPTION -> String (36970.0) -
Ruby の詳細を表す文字列。
Ruby の詳細を表す文字列。
ruby -v で表示される内容が格納されています。 -
Object
:: RUBY _ VERSION -> String (36970.0) -
Ruby のバージョンを表す文字列。
Ruby のバージョンを表す文字列。
Ruby のバージョンは、major.minor.teeny という形式です。 -
Array
# find _ index -> Enumerator (36955.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数として順にブロックを実行し、
ブロックが真を返した最初... -
Complex
# infinite? -> nil | 1 (36955.0) -
実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。
実部と虚部のどちらも無限大ではない場合に nil を、そうでない場合に 1 を返します。
//emlist[例][ruby]{
(1+1i).infinite? # => nil
(Float::INFINITY + 1i).infinite? # => 1
//}
@see Complex#finite? -
ObjectSpace
. # define _ finalizer(obj) {|id| . . . } -> Array (36955.0) -
obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。
obj が解放されるときに実行されるファイナライザ proc を
登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで
はなく追加登録されます。固定値 0 と proc を配列にして返します。
ブロックを指定した場合は、そのブロックがファイナライザになります。
obj の回収時にブロックは obj の ID (BasicObject#__id__)を引数とし
て実行されます。
しかし、後述の問題があるのでブロックでファイナライザを登録するのは難しいでしょう。
@param obj ファイナライザを登録したいオブジェクトを指定します。
@param proc ファイナライザ... -
ObjectSpace
. # define _ finalizer(obj , proc) -> Array (36955.0) -
obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。
obj が解放されるときに実行されるファイナライザ proc を
登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで
はなく追加登録されます。固定値 0 と proc を配列にして返します。
ブロックを指定した場合は、そのブロックがファイナライザになります。
obj の回収時にブロックは obj の ID (BasicObject#__id__)を引数とし
て実行されます。
しかし、後述の問題があるのでブロックでファイナライザを登録するのは難しいでしょう。
@param obj ファイナライザを登録したいオブジェクトを指定します。
@param proc ファイナライザ... -
Object
:: RUBY _ COPYRIGHT -> String (36952.0) -
Ruby のコピーライトを表す文字列。
Ruby のコピーライトを表す文字列。 -
Object
:: RUBY _ REVISION -> String (36952.0) -
Ruby の GIT コミットハッシュを表す String オブジェクトです。
Ruby の GIT コミットハッシュを表す String オブジェクトです。 -
REXML
:: Document . entity _ expansion _ text _ limit -> Integer (36937.0) -
実体参照の展開による文字列の増分(テキストのバイト数)の 最大値を指定します。
実体参照の展開による文字列の増分(テキストのバイト数)の
最大値を指定します。
展開によって増分値がこの値を越えると
例外を発生させ、処理を中断します。
実体参照の展開処理を使った DoS 攻撃に対抗するための
仕組みです。
デフォルトは 10240 (byte) です。
このメソッドは Ruby 2.1 から deprecated になりました。
REXML::Security.entity_expansion_text_limit を使ってください。
@see REXML::Document.entity_expansion_text_limit=,
http://ww... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (36937.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッドでこの文字列にアクセス出来ます。
注意: 変換後のバイナリデータはポータブルではありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他... -
Float
# infinite? -> 1 | -1 | nil (36919.0) -
数値が +∞ のとき 1、-∞のとき -1 を返します。それ以外は nil を返 します。
数値が +∞ のとき 1、-∞のとき -1 を返します。それ以外は nil を返
します。
//emlist[例][ruby]{
inf = 1.0/0
p inf # => Infinity
p inf.infinite? # => 1
inf = -1.0/0
p inf # => -Infinity
p inf.infinite? # => -1
//} -
Kconv
. # isjis(str) -> bool (36919.0) -
文字列 str が ISO-2022-JP なバイト列として正当であるかどうかを判定します。
文字列 str が ISO-2022-JP なバイト列として正当であるかどうかを判定します。
@param str 判定対象の文字列
@see String#isjis
//emlist[例][ruby]{
require 'kconv'
euc_str = "\
\xa5\xaa\xa5\xd6\xa5\xb8\xa5\xa7\xa5\xaf\xa5\xc8\xbb\xd8\xb8\xfe\
\xa5\xd7\xa5\xed\xa5\xb0\xa5\xe9\xa5\xdf\xa5\xf3\xa5\xb0\xb8\xc0\xb8\xec\
\x52\x75\x62\x79".force_... -
Kernel
# wait _ writable -> () (36919.0) -
ファイルが書き込み可能になるまで待ちます。
ファイルが書き込み可能になるまで待ちます。
ruby -run -e wait_writable -- [OPTION] FILE
-n RETRY リトライ回数
-w SEC リトライごとに待つ秒数
-v 詳細表示 -
Object
# instance _ variable _ defined?(var) -> bool (36919.0) -
インスタンス変数 var が定義されていたら真を返します。
インスタンス変数 var が定義されていたら真を返します。
@param var インスタンス変数名を文字列か Symbol で指定します。
//emlist[][ruby]{
class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end
end
fred = Fred.new('cat', 99)
p fred.instance_variable_defined?(:@a) #=> true
p fred.instance_variable_defined?("@b") #=> true
p fred.instan... -
ObjectSpace
. # undefine _ finalizer(obj) -> object (36919.0) -
obj に対するファイナライザをすべて解除します。 obj を返します。
obj に対するファイナライザをすべて解除します。
obj を返します。
@param obj ファイナライザを解除したいオブジェクトを指定します。
//emlist[例][ruby]{
class Sample
def Sample.callback
proc {
puts "finalize"
}
end
def initialize
ObjectSpace.define_finalizer(self, Sample.callback)
end
def undef
ObjectSpace.undefine_final... -
REXML
:: Document . entity _ expansion _ limit -> Integer (36919.0) -
実体参照の展開回数の上限を返します。
実体参照の展開回数の上限を返します。
XML 文書(REXML::Document)ごとの展開回数がこの値を越えると
例外を発生させ、処理を中断します。
実体参照の展開処理を使った DoS 攻撃に対抗するための
仕組みです。
デフォルトは 10000 です。
このメソッドは Ruby 2.1 から deprecated になりました。
REXML::Security.entity_expansion_limit を使ってください。
@see REXML::Document.entity_expansion_limit= -
RubyVM
:: InstructionSequence # inspect -> String (36919.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path -
Gem
:: RubyGemsPackageVersion -> String (36901.0) -
このライブラリのバージョンを表す文字列。
このライブラリのバージョンを表す文字列。 -
Gem
:: RubyGemsVersion -> String (36901.0) -
このライブラリのバージョンを表す文字列。
このライブラリのバージョンを表す文字列。 -
Gem
:: Specification # rubygems _ version -> String (36901.0) -
この Gem パッケージを作成した RubyGems のバージョンを返します。
この Gem パッケージを作成した RubyGems のバージョンを返します。 -
Binding
# local _ variable _ defined?(symbol) -> bool (36637.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、
そうでない場合に false を返します。
@param symbol ローカル変数名を Symbol オブジェクトで指定します。
//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_defined?(:a) # => true
binding.local_variable_defined?(:b) # => false
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
bindin... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (36601.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
self が表す命令シーケンスの 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2 -
StringScanner
# bol? -> bool (36319.0) -
スキャンポインタが行頭を指しているなら true を、 行頭以外を指しているなら false を返します。
スキャンポインタが行頭を指しているなら true を、
行頭以外を指しているなら false を返します。
行頭の定義は、文字列先頭かまたは \n の直後を指していることです。
文字列末尾は必ずしも行頭ではありません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new("test\nstring")
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
s.scan(/\n/)
s.bol? # => true
s.scan(/\w+/... -
rubygems
/ commands / generate _ index _ command (36055.0) -
ある Gem サーバに対するインデックスを作成するためのライブラリです。
ある Gem サーバに対するインデックスを作成するためのライブラリです。
Usage: gem generate_index [options]
Options:
-d, --directory=DIRNAME repository base dir containing gems subdir
Common Options:
-h, --help このコマンドのヘルプを表示します
-V, --[no-]verbose 表示を詳細にします
... -
rubygems
/ commands / environment _ command (36037.0) -
RubyGems の環境に関する情報を表示するためのライブラリです。
RubyGems の環境に関する情報を表示するためのライブラリです。
Usage: gem environment [arg] [options]
Common Options:
-h, --help このコマンドのヘルプを表示します
-V, --[no-]verbose 表示を詳細にします
-q, --quiet 静かに実行します
--config-file FILE 指定された設定ファイル... -
RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (29167.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定します。
@param path 引数 file の絶対パスファイル名を文字列で指定します。
@param line 引数 source の 1 行目の行番号を指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
... -
Matrix
# find _ index(selector = :all) {|e| . . . } -> [Integer , Integer] | nil (28519.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
指定した値と一致する要素の位置を [row, column] という配列で返します。
ブロックを与えた場合は各要素を引数としてブロックを呼び出し、
返り値が真であった要素の位置を返します。
複数の位置で値が一致する/ブロックが真を返す、場合は最初
に見つかった要素の位置を返します。
selector で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ ... -
Matrix
# find _ index(value , selector = :all) -> [Integer , Integer] | nil (28519.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
指定した値と一致する要素の位置を [row, column] という配列で返します。
ブロックを与えた場合は各要素を引数としてブロックを呼び出し、
返り値が真であった要素の位置を返します。
複数の位置で値が一致する/ブロックが真を返す、場合は最初
に見つかった要素の位置を返します。
selector で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ ... -
IO
# internal _ encoding -> Encoding | nil (28237.0) -
IO の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
IO の内部エンコーディングを返します。
内部エンコーディングが指定されていない場合は nil を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") do |f|
p f.internal_encoding # => nil
f.set_encoding("ASCII-8BIT", "EUC-JP")
p f.internal_encoding # => #<Encoding:EUC-JP>
end
//} -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (28237.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("puts 'hello'")
end
//}
@raise RuntimeError :script_comp... -
FileUtils
. # chdir(dir , options = {}) {|dir| . . . . } -> object (28219.0) -
プロセスのカレントディレクトリを dir に変更します。
プロセスのカレントディレクトリを dir に変更します。
ブロックとともに呼び出された時はブロック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//} -
FileUtils
. # compare _ file(file _ a , file _ b) -> bool (28219.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//} -
Exception
. exception(error _ message = nil) -> Exception (27973.0) -
例外オブジェクトを生成して返します。
例外オブジェクトを生成して返します。
@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。
//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}
//emlist[例][ruby]{
e = E... -
Readline
. # readline(prompt = "" , add _ hist = false) -> String | nil (27973.0) -
prompt を出力し、ユーザからのキー入力を待ちます。 エンターキーの押下などでユーザが文字列を入力し終えると、 入力した文字列を返します。 このとき、add_hist が true であれば、入力した文字列を入力履歴に追加します。 何も入力していない状態で EOF(UNIX では ^D) を入力するなどで、 ユーザからの入力がない場合は nil を返します。
prompt を出力し、ユーザからのキー入力を待ちます。
エンターキーの押下などでユーザが文字列を入力し終えると、
入力した文字列を返します。
このとき、add_hist が true であれば、入力した文字列を入力履歴に追加します。
何も入力していない状態で EOF(UNIX では ^D) を入力するなどで、
ユーザからの入力がない場合は nil を返します。
本メソッドはスレッドに対応しています。
入力待ち状態のときはスレッドコンテキストの切替えが発生します。
入力時には行内編集が可能で、vi モードと Emacs モードが用意されています。
デフォルトは Emacs モードです。
... -
String
# lines(rs = $ / , chomp: false) -> [String] (27973.0) -
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
//emlist[][ruby]{
"aa\nbb\ncc\n".lines # => ["aa\n", "bb\n", "cc\n"]
//}
行の区切りは rs に指定した文字列で、 そのデフォルト値は変数 $/ の値です。
各 line には区切りの文字列も含みます。
rs に nil を指定すると行区切りなしとみなします。 rs に空文字列 "" を指
定すると「パラグラフモード」になり、 改行コードが 2 つ以上連続するとこ
ろで文字列を分割します (つまり空行で分割します)。
... -
String
# lines(rs = $ / , chomp: false) {|line| . . . } -> self (27973.0) -
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
//emlist[][ruby]{
"aa\nbb\ncc\n".lines # => ["aa\n", "bb\n", "cc\n"]
//}
行の区切りは rs に指定した文字列で、 そのデフォルト値は変数 $/ の値です。
各 line には区切りの文字列も含みます。
rs に nil を指定すると行区切りなしとみなします。 rs に空文字列 "" を指
定すると「パラグラフモード」になり、 改行コードが 2 つ以上連続するとこ
ろで文字列を分割します (つまり空行で分割します)。
... -
StringScanner
# string -> String (27973.0) -
スキャン対象にしている文字列を返します。
スキャン対象にしている文字列を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.string # => "test string"
//}
返り値は freeze されていません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.string.frozen? # => false
//}
なお、このメソッドは StringScanner.new に渡した
文字列をその... -
Array
# index {|item| . . . } -> Integer | nil (27955.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数として順にブロックを実行し、
ブロックが真を返した最初... -
Array
# index(val) -> Integer | nil (27955.0) -
条件に一致する最初の要素の位置を返します。
条件に一致する最初の要素の位置を返します。
@param val 位置を知りたいオブジェクトを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
p [1, 0, 0, 1, 0].index(1) #=> 0
p [1, 0, 0, 0, 0].index(1) #=> 0
p [0, 0, 0, 0, 0].index(1) #=> nil
//}
ブロックが与えられた場合には、各要素を引数として順にブロックを実行し、
ブロックが真を返した最初... -
String
# codepoints -> [Integer] (27955.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#e... -
String
# codepoints {|codepoint| block } -> self (27955.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#e... -
String
# encoding -> Encoding (27955.0) -
文字列のエンコーディング情報を表現した Encoding オブジェクトを返します。
文字列のエンコーディング情報を表現した Encoding オブジェクトを返します。
//emlist[例][ruby]{
# encoding: utf-8
utf8_str = "test"
euc_str = utf8_str.encode("EUC-JP")
utf8_str.encoding # => #<Encoding:UTF-8>
euc_str.encoding # => #<Encoding:EUC-JP>
//}
@see Encoding -
String
# rindex(pattern , pos = self . size) -> Integer | nil (27955.0) -
文字列のインデックス pos から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のインデックスを返します。 見つからなければ nil を返します。
文字列のインデックス pos から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定します。
pos が負の場合は、文字列の末尾から数えた位置から探索します。
rindex と String#index とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。
探索はその開始位置を右から左にずらしながら行いますが、
部分文字列の照合はどちらのメソッドも左から右に向かって行います。
以下の例を参照して... -
Fiddle
:: RUBY _ FREE -> Integer (27952.0) -
ruby_xfree の関数ポインタのアドレスの値。
ruby_xfree の関数ポインタのアドレスの値。 -
Gem
:: Specification # to _ ruby -> String (27952.0) -
自身を再現するための Ruby スクリプトを文字列で返します。
自身を再現するための Ruby スクリプトを文字列で返します。
省略されている値はデフォルト値が使用されます。 -
RbConfig
. ruby -> String (27952.0) -
ruby コマンドのフルパスを返します。
ruby コマンドのフルパスを返します。 -
WEBrick
:: HTTPServlet :: CGIHandler :: Ruby -> String (27952.0) -
Ruby のパスを返します。
Ruby のパスを返します。 -
Gem
:: SourceIndex . from _ gems _ in(*spec _ dirs) -> Gem :: SourceIndex (27949.0) -
引数で与えられたディレクトリに置かれている Ruby スクリプト形式の gemspec ファイルを使用して 新しいインスタンスを作成します。
引数で与えられたディレクトリに置かれている Ruby スクリプト形式の gemspec ファイルを使用して
新しいインスタンスを作成します。
@param spec_dirs gemspec ファイルが置かれているディレクトリを一つ以上指定します。 -
Encoding
. find(name) -> Encoding (27937.0) -
指定された name という名前を持つ Encoding オブジェクトを返します。
指定された name という名前を持つ Encoding オブジェクトを返します。
@param name エンコーディング名を表す String を指定します。
@return 発見された Encoding オブジェクトを返します。
@raise ArgumentError 指定した名前のエンコーディングが発見できないと発生します。
特殊なエンコーディング名として、ロケールエンコーディングを表す locale、default_external を表す external、default_internal を表す internal、ファイルシステムエンコーディングを表す filesystem... -
Encoding
:: Converter # source _ encoding -> Encoding (27937.0) -
変換元のエンコーディングを返します。
変換元のエンコーディングを返します。
@return 変換元のエンコーディング
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "euc-jp")
ec.source_encoding #=> #<Encoding:UTF-8>
//} -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (27937.0) -
各属性に対しブロックを呼び出します。
各属性に対しブロックを呼び出します。
個々の属性は REXML::Attribute オブジェクトで渡されます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (27937.0) -
name という名前の属性を取得します。
name という名前の属性を取得します。
name という名前を持つ属性がない場合は nil を返します。
@param name 属性名(文字列)
@see REXML::Attributes#[]
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (27937.0) -
namespace と name で特定される属性を返します。
namespace と name で特定される属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使うことで属性を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.ne... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname) -> RubyVM :: AbstractSyntaxTree :: Node (27937.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
@param pathname パースする対象のファイルパスを指定します
@raise SyntaxError pathname から取得された文字列が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse_file(__FILE__)
# => (SCOPE@1:0-1:50
# tbl: []
# args: nil
# body:
# (F... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (27937.0) -
self のデバッグ用の情報を含んだ文字列を返します。
self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//} -
String
# inspect -> String (27937.0) -
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。
変換された文字列は印字可能な文字のみによって構成されます
現在の実装では、Ruby のリテラル形式を使って、
文字列中の不可視文字をエスケープシーケンスに変換します。
このメソッドは主にデバッグのために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。
//emlist[例][ruby]{
# p ではないことに注意
puts "string".inspect # => "string"
puts "\t\r\n".inspect ... -
WIN32OLE
# ole _ query _ interface(iid) -> WIN32OLE (27937.0) -
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを
持つオブジェクトを取得します。
オブジェクトが複数のオートメーション用インターフェイスを持つ場合に、当
メソッドを利用して既定のインターフェイスとは異なるインターフェイスを取
得します。
@param iid 取得するインターフェイスのIIDを文字列で指定します。
@return iidパラメータで指定したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場合に通知されます。
ie = WIN32OLE.n... -
BasicObject
# singleton _ method _ undefined(name) -> object (27919.0) -
特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。
特異メソッドが Module#undef_method または
undef により未定義にされた時にインタプリタから呼び出されます。
通常のメソッドの未定義に対するフックには
Module#method_undefined を使います。
@param name 未定義にされたメソッド名が Symbol で渡されます。
//emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)
puts "singleton method \"#{name}\" was undefined"
end
end
obj... -
Encoding
# inspect -> String (27919.0) -
プログラマにわかりやすい表現の文字列を返します。
プログラマにわかりやすい表現の文字列を返します。
//emlist[例][ruby]{
Encoding::UTF_8.inspect #=> "#<Encoding:UTF-8>"
Encoding::ISO_2022_JP.inspect #=> "#<Encoding:ISO-2022-JP (dummy)>"
//} -
Encoding
:: Converter # finish -> String (27919.0) -
変換処理を終了し、結果文字列の末尾を返します。 変換元の文字列の末尾がバイト列の途中で終わっていた場合、保持しているバイト列全てを返します。
変換処理を終了し、結果文字列の末尾を返します。
変換元の文字列の末尾がバイト列の途中で終わっていた場合、保持しているバイト列全てを返します。
@return 変換結果の末尾
@raise Encoding::InvalidByteSequenceError 変換元のエンコーディングにお
いて不正なバイト列があった場合に発生します。
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-2022-jp")
p ec.convert("\u3042") #=> "\e$B$\""
p ec.finish ... -
Encoding
:: Converter # insert _ output(string) -> nil (27919.0) -
変換器内のバッファに文字列を挿入します。 バッファに保持された文字列は、次の変換時の変換結果と一緒に返されます。
変換器内のバッファに文字列を挿入します。
バッファに保持された文字列は、次の変換時の変換結果と一緒に返されます。
変換先がステートフルなエンコーディングであった場合、
挿入された文字列は状態に基づいて変換され、状態を更新します。
このメソッドは変換に際してエラーが発生した際にのみ利用されるべきです。
@param string 挿入する文字列
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-8859-1")
src = "HIRAGANA LETTER A is \u{3042}."
dst = ""
p ec.... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (27919.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
... -
Exception
# exception(error _ message) -> Exception (27919.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin
# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogeho... -
FileUtils
. # chdir(dir , options = {}) -> 0 (27919.0) -
プロセスのカレントディレクトリを dir に変更します。
プロセスのカレントディレクトリを dir に変更します。
ブロックとともに呼び出された時はブロック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//} -
FileUtils
. # mkdir(dir , options = {}) -> () (27919.0) -
ディレクトリ dir を作成します。
ディレクトリ dir を作成します。
@param dir 作成するディレクトリ。
@param options :mode, :noop, :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.mkdir('test')
FileUtils.mkdir(%w( tmp data ))
FileUtils.mkdir('notexist', noop: true) # does not create really
//} -
FileUtils
. # rmdir(dir , options = {}) -> () (27919.0) -
ディレクトリ dir を削除します。
ディレクトリ dir を削除します。
ディレクトリにファイルが残っていた場合は削除に失敗します。
@param dir 削除するディレクトリを指定します。一つの場合は文字列でも指定可能です。
二つ以上指定する場合は配列で指定します。
@param options :parents, :noop, :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.rmdir('somedir')
FileUtils.rmdir(%... -
Integer
# denominator -> Integer (27919.0) -
分母(常に1)を返します。
分母(常に1)を返します。
@return 分母を返します。
//emlist[][ruby]{
10.denominator # => 1
-10.denominator # => 1
//}
@see Integer#numerator