11789件ヒット
[1-100件を表示]
(0.096秒)
別のキーワード
種類
ライブラリ
- ビルトイン (5991)
- abbrev (12)
- benchmark (12)
- bigdecimal (70)
- csv (96)
- date (72)
- dbm (48)
- digest (36)
- drb (12)
- fiddle (72)
- gdbm (36)
- getoptlong (24)
- ipaddr (60)
-
irb
/ cmd / chws (24) -
irb
/ output-method (48) -
irb
/ workspace (12) - json (24)
- matrix (279)
-
minitest
/ mock (1) -
net
/ http (60) -
net
/ pop (24) - open-uri (36)
- openssl (780)
- optparse (312)
- ostruct (77)
- pathname (1102)
- pp (24)
- prettyprint (12)
- prime (84)
- profiler (6)
- psych (60)
- rake (84)
-
rake
/ packagetask (12) -
rdoc
/ code _ object (36) -
rdoc
/ text (12) - readline (24)
- resolv (12)
-
rexml
/ document (324) - ripper (24)
-
ripper
/ filter (24) -
rubygems
/ dependency (24) -
rubygems
/ digest / digest _ adapter (12) -
rubygems
/ package / tar _ output (12) -
rubygems
/ package / tar _ writer (60) -
rubygems
/ security (12) -
rubygems
/ source _ index (12) -
rubygems
/ version (36) - sdbm (84)
- set (225)
- shell (30)
-
shell
/ command-processor (36) -
shell
/ filter (6) - socket (12)
- stringio (150)
- strscan (12)
- syslog (60)
- tempfile (36)
- time (48)
- uri (60)
-
webrick
/ httpservlet / prochandler (12) -
webrick
/ httputils (24) -
win32
/ registry (24) - win32ole (180)
-
yaml
/ dbm (24) - zlib (108)
クラス
-
ARGF
. class (98) - Array (661)
- BasicObject (36)
-
Benchmark
:: Job (12) - BigDecimal (56)
- Bignum (9)
- Binding (19)
- CSV (24)
-
CSV
:: Row (12) -
CSV
:: Table (36) - Complex (78)
- DBM (48)
-
DRb
:: DRbUnknown (12) - Data (15)
- Date (72)
-
Digest
:: Base (36) - Dir (81)
- Enumerator (60)
-
Enumerator
:: Chain (7) -
Enumerator
:: Lazy (12) - Exception (48)
- Fiber (30)
-
Fiddle
:: Pointer (72) - File (24)
-
File
:: Stat (12) - Fixnum (9)
- Float (32)
- FrozenError (6)
- GDBM (36)
-
Gem
:: Dependency (24) -
Gem
:: DigestAdapter (12) -
Gem
:: Package :: TarOutput (12) -
Gem
:: Package :: TarWriter (60) -
Gem
:: SourceIndex (12) -
Gem
:: Version (36) - GetoptLong (24)
- Hash (453)
- IO (314)
- IPAddr (60)
-
IRB
:: ExtendCommand :: ChangeWorkspace (12) -
IRB
:: ExtendCommand :: CurrentWorkingWorkspace (12) -
IRB
:: OutputMethod (48) - Integer (156)
-
JSON
:: State (24) - MatchData (60)
- Matrix (179)
-
Matrix
:: LUPDecomposition (12) - Method (83)
-
MiniTest
:: Mock (1) - Module (360)
- NameError (20)
-
Net
:: HTTP (24) -
Net
:: HTTPResponse (36) -
Net
:: POP3 (24) - Numeric (223)
- Object (216)
-
OpenSSL
:: ASN1 :: Constructive (12) -
OpenSSL
:: BN (168) -
OpenSSL
:: Cipher (60) -
OpenSSL
:: Config (12) -
OpenSSL
:: Digest (36) -
OpenSSL
:: Engine (12) -
OpenSSL
:: HMAC (36) -
OpenSSL
:: Netscape :: SPKI (12) -
OpenSSL
:: OCSP :: BasicResponse (36) -
OpenSSL
:: OCSP :: Request (36) -
OpenSSL
:: PKCS7 (48) -
OpenSSL
:: PKey :: DH (12) -
OpenSSL
:: PKey :: EC (12) -
OpenSSL
:: PKey :: EC :: Group (12) -
OpenSSL
:: PKey :: EC :: Point (36) -
OpenSSL
:: SSL :: SSLContext (12) -
OpenSSL
:: SSL :: SSLSocket (48) -
OpenSSL
:: X509 :: CRL (12) -
OpenSSL
:: X509 :: Certificate (24) -
OpenSSL
:: X509 :: Request (12) -
OpenSSL
:: X509 :: Store (48) -
OpenSSL
:: X509 :: StoreContext (12) - OpenStruct (77)
- OptionParser (264)
-
OptionParser
:: ParseError (24) - Pathname (1102)
- PrettyPrint (12)
-
Prime
:: PseudoPrimeGenerator (72) - Proc (62)
-
Process
:: Status (36) -
Psych
:: Nodes :: Node (24) -
Psych
:: Parser (12) -
Psych
:: Stream (24) -
RDoc
:: CodeObject (36) -
REXML
:: Attribute (12) -
REXML
:: Attributes (24) -
REXML
:: Child (48) -
REXML
:: DocType (12) -
REXML
:: Element (84) -
REXML
:: ExternalEntity (12) -
REXML
:: NotationDecl (12) -
REXML
:: Parent (84) -
REXML
:: Text (12) -
Rake
:: FileList (60) -
Rake
:: PackageTask (12) -
Rake
:: Task (24) - Range (91)
- Rational (21)
- Refinement (4)
- Regexp (12)
-
Resolv
:: DNS :: Name (12) - Ripper (24)
-
Ripper
:: Filter (24) -
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (48) - SDBM (84)
- Set (300)
- Shell (30)
-
Shell
:: CommandProcessor (36) -
Shell
:: Filter (6) - SignalException (24)
-
Socket
:: Ifaddr (12) - String (1259)
- StringIO (150)
- StringScanner (12)
- Struct (84)
- Symbol (132)
- SystemCallError (12)
- Tempfile (36)
- Thread (72)
-
Thread
:: Backtrace :: Location (24) - ThreadGroup (36)
- Time (235)
- TracePoint (96)
-
URI
:: Generic (60) - UnboundMethod (47)
- UncaughtThrowError (11)
- Vector (88)
-
WEBrick
:: HTTPServlet :: ProcHandler (12) -
WEBrick
:: HTTPUtils :: FormData (24) -
WIN32OLE
_ TYPE (132) -
WIN32OLE
_ VARIANT (48) -
Win32
:: Registry (24) -
YAML
:: DBM (24) -
Zlib
:: Deflate (12) -
Zlib
:: GzipFile :: Error (12) -
Zlib
:: GzipReader (48) -
Zlib
:: GzipWriter (24) -
Zlib
:: Inflate (12)
モジュール
- Comparable (27)
- Enumerable (280)
-
Gem
:: Security (12) - Kernel (14)
- ObjectSpace (36)
-
OpenSSL
:: Buffering (12) -
OpenSSL
:: Random (12) -
OpenSSL
:: X509 (24) -
OpenURI
:: OpenRead (36) -
OptionParser
:: Arguable (24) - Process (12)
-
RDoc
:: Text (12) -
REXML
:: Namespace (12) -
REXML
:: Node (12) - Syslog (60)
オブジェクト
- ENV (154)
-
Readline
:: HISTORY (24) - main (14)
キーワード
- != (12)
- !~ (12)
- % (38)
- & (12)
- * (36)
- ** (12)
- + (36)
-
/ (11) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - < (12)
- << (170)
- <=> (126)
- == (51)
- === (36)
- =~ (36)
- >> (26)
- BigDecimal (14)
- Comparable (12)
-
Data
_ Get _ Struct (12) - Marshal フォーマット (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (4) - Numeric (12)
- Options (12)
-
Profiler
_ _ (6) - Ruby プログラムの実行 (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- UnboundMethod (12)
-
V
_ ERR _ DEPTH _ ZERO _ SELF _ SIGNED _ CERT (12) -
V
_ ERR _ SELF _ SIGNED _ CERT _ IN _ CHAIN (12) - WorkSpace (12)
- X509 (12)
- [] (144)
- []= (127)
-
_ dump (12) - abbrev (12)
- abs (12)
- abs2 (12)
- absolute? (12)
-
absolute
_ path (24) - accept (12)
-
accept
_ nonblock (12) - add (36)
- add? (12)
-
add
_ cert (12) -
add
_ certid (12) -
add
_ certificate (12) -
add
_ crl (24) -
add
_ file (36) -
add
_ file _ simple (24) -
add
_ gem _ contents (12) -
add
_ namespace (24) -
add
_ nonce (24) -
add
_ path (12) -
add
_ recipient (12) -
add
_ signer (12) -
add
_ status (12) -
alias
_ command (18) - append (8)
-
append
_ data (12) -
append
_ features (12) -
arg
_ defined (12) - ascend (24)
- assign (12)
- atime (12)
- autoload (12)
- basename (12)
- between? (12)
- bind (12)
- binread (12)
- binwrite (12)
- birthtime (11)
-
block
_ pass (12) - blockdev? (12)
-
build
_ self _ signed _ cert (12) - byterindex (3)
- bytes (14)
- bytesplice (10)
-
call
_ trace _ func (12) - capitalize (12)
- capitalize! (12)
- casecmp (12)
- casecmp? (9)
- cause (12)
- cd (12)
- center (12)
- chardev? (12)
- chdir (6)
- children (26)
- chmod (12)
- chomp (12)
- chomp! (12)
- chop! (12)
- chown (12)
- chr (36)
-
chunk
_ while (12) - clamp (15)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) - cleanup (12)
- clear (60)
-
clear
_ bit! (12) -
clear
_ prerequisites (12) -
clock
_ gettime (12) - clone (24)
- codepoints (66)
- coerce (36)
- collect! (64)
- column (48)
- compact (25)
- compact! (21)
-
compare
_ by _ identity (12) - component (12)
- concat (42)
- configure (12)
- connect (12)
-
connect
_ nonblock (12) - copy (12)
- count (12)
- covector (12)
- cover? (14)
- create (12)
-
cross
_ product (12) - crypt (12)
- ctime (12)
-
ctrl
_ cmd (12) - curry (22)
- decrypt (24)
- dedup (3)
- default (24)
-
default
_ event _ sources (12) -
default
_ ole _ types (12) -
default
_ port (12) - define (12)
-
define
_ finalizer (24) -
defined
_ class (12) - delete (48)
- delete! (12)
- delete? (12)
-
delete
_ if (72) -
delete
_ namespace (12) -
delete
_ prefix! (8) -
deprecate
_ constant (12) - descend (24)
- dig (10)
- directory? (12)
- dirname (12)
- disable (24)
- disjoint? (12)
- display (12)
- div (12)
- downcase (9)
- downcase! (12)
- dup (32)
- each (348)
-
each
_ byte (72) -
each
_ char (24) -
each
_ child (38) -
each
_ codepoint (96) -
each
_ cons (8) -
each
_ entry (15) -
each
_ filename (12) -
each
_ grapheme _ cluster (16) -
each
_ key (48) -
each
_ line (168) -
each
_ pair (132) -
each
_ slice (8) -
each
_ value (24) -
each
_ with _ index (48) - eigen (12)
- eigensystem (12)
- empty? (9)
- enable (24)
- enabled? (12)
- enclose (12)
- encode (36)
- encode! (24)
- encrypt (24)
- enhance (12)
- entries (19)
-
enum
_ for (24) - eql? (39)
- equal? (24)
- eval (24)
- exception (36)
- exclude (12)
- executable? (12)
-
executable
_ real? (12) - execute (24)
- exist? (12)
- exit (12)
- expect (1)
- exponent (12)
- extend (12)
- extended (12)
- extname (12)
- fdiv (30)
- file (12)
- file? (12)
- fill (72)
- find (24)
-
find
_ proxy (12) -
first
_ column (7) -
first
_ lineno (19) - flatten (24)
- flatten! (24)
- flush (12)
-
flush
_ sessions (12) - fnmatch (12)
- fnmatch? (12)
-
force
_ encoding (12) - freeze (12)
- friday? (12)
- ftype (12)
-
generate
_ key (12) -
generate
_ key! (12) -
get
_ instance (12) - getopts (24)
- gmt? (12)
- gmtime (12)
-
grapheme
_ clusters (16) - group (12)
- grpowned? (12)
- gsub! (60)
-
has
_ name? (12) - hash (48)
- header (12)
- hex (12)
- i (12)
-
implemented
_ ole _ types (12) - import (12)
-
import
_ methods (4) - include (12)
- include? (12)
- included (12)
- independent? (12)
-
index
_ in _ parent (12) -
initialize
_ copy (12) - inject (36)
- insert (24)
-
insert
_ after (12) -
insert
_ before (12) - inspect (179)
-
instance
_ eval (24) - intersect? (12)
- invert! (12)
- irb (12)
-
irb
/ ext / workspaces (12) -
irb
/ workspace (12) -
keep
_ if (84) - kill (12)
-
last
_ column (7) -
last
_ lineno (7) - lazy (12)
- lchmod (12)
- lchown (12)
- length (12)
- lineno (24)
- lines (32)
- list (12)
- ljust (12)
-
load
_ gems _ in (12) -
local
_ variables (10) - localtime (24)
- log (12)
- lshift! (12)
- lstat (12)
- lstrip! (12)
- lup (12)
-
lup
_ decomposition (12) - magnitude (12)
- main (12)
-
make
_ affine! (12) -
make
_ link (12) -
make
_ symlink (12) - map! (64)
- markup (12)
- mask! (12)
-
mask
_ bits! (12) - massign (12)
- match (36)
- match? (18)
-
max
_ by (48) - merge (48)
- merge! (36)
- minor (24)
- mkdir (24)
- mkpath (12)
-
mod
_ add (12) -
mod
_ exp (12) -
mod
_ inverse (12) -
mod
_ mul (12) -
mod
_ sqr (12) -
mod
_ sub (12) -
module
_ eval (24) -
module
_ exec (12) - modulo (12)
- monday? (12)
- mountpoint? (12)
- mtime (12)
- name (12)
- namespace (12)
- namespaces (24)
- native (12)
- new (36)
- next (12)
- next! (12)
-
next
_ float (11) -
next
_ sibling= (12) - nonzero? (12)
- offset (24)
-
ole
_ type (12) - on (144)
-
on
_ head (12) -
on
_ tail (12) - open (96)
- open! (12)
- opendir (24)
- ord (12)
- order! (24)
- overlap? (2)
- owned? (12)
- parent (12)
- parent= (12)
-
parent
_ file _ name (12) -
parent
_ name (12) - parse (12)
- parse! (12)
-
parse
_ csv (12) - parser (12)
- partition (12)
- path (36)
-
pending
_ interrupt? (12) - permutation (24)
- permute! (12)
- pipe? (12)
- polar (12)
- pos= (12)
- positive? (29)
- pow (24)
- power (24)
- pp (24)
- ppx (12)
- precs (12)
- pred (12)
- prefixes (24)
- prepend (20)
-
prepend
_ features (12) - prepended (12)
- prerelease? (12)
-
pretty
_ inspect (12) -
pretty
_ print (12) -
prev
_ float (11) -
prev
_ year (12) -
previous
_ sibling= (12) -
prime
_ division (12) - printf (12)
- printn (12)
- private (7)
-
private
_ class _ method (24) -
private
_ constant (12) -
proc
_ eq (12) -
proc
_ invoke (12) -
proc
_ to _ s (12) - product (24)
- profile (6)
- progid (12)
-
proper
_ subset? (12) -
proper
_ superset? (12) - public (55)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) - push (60)
- putc (12)
- puts (36)
- quo (12)
- raise (18)
-
random
_ add (12) - rationalize (12)
-
rb
_ iterate (12) -
rb
_ yield _ 0 (12) - read (24)
- readable? (12)
-
readable
_ real? (12) -
reader
_ header (12) - readlines (12)
- readlink (12)
- realpath (24)
- receiver (16)
- recover (12)
- reduce (36)
- rehash (12)
- reject (24)
- reject! (72)
- relative? (12)
-
relative
_ path _ from (12) - remainder (12)
- rename (12)
- reopen (60)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (108)
-
replace
_ child (12) -
replace
_ with (12) - report (12)
- reset (36)
- response (12)
- resume (12)
- reverse (12)
- reverse! (24)
-
reverse
_ each (28) - rewind (12)
- rfc2822 (12)
- rfc822 (12)
- rindex (12)
- rjust (12)
- rmdir (12)
- rmtree (12)
- root? (12)
- round (12)
- row (24)
- rpartition (12)
- rshift! (12)
- rstrip! (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) - sample (48)
- saturday? (12)
- scan (24)
- scrub (12)
- scrub! (12)
- seek (12)
- select! (20)
- set (12)
-
set
_ bit! (12) -
set
_ encoding (60) -
set
_ generator (12) -
set
_ option (12) -
set
_ to _ infinity! (12) - setgid? (12)
- setuid? (12)
- shift (12)
- sign (72)
- signm (12)
- signo (12)
-
singleton
_ methods (12) - size (24)
- size? (12)
- skip (12)
- slice (84)
-
slice
_ when (12) - socket? (12)
- solve (12)
- sort (24)
- sort! (24)
-
sort
_ by (24) -
source
_ location (7) -
source
_ ole _ types (12) -
specific
_ eval (12) - split (26)
- squeeze! (12)
-
src
_ type (12) - start (72)
-
start
_ with? (14) - stat (12)
- step (148)
- sticky? (12)
-
stop
_ doc (12) - strip! (12)
- strptime (24)
- sub (24)
- sub! (48)
-
subdomain
_ of? (12) - subset? (12)
- subtract (12)
- succ (19)
- succ! (12)
- sum (12)
- summarize (24)
- sunday? (12)
-
super
_ method (22) - superclass (12)
- superset? (12)
- swapcase (12)
- swapcase! (12)
- symlink? (12)
- sysopen (12)
- taint (6)
- tally (8)
- tap (12)
- terminate (24)
- thursday? (12)
-
to
_ a (31) -
to
_ bn (24) -
to
_ c (24) -
to
_ csv (12) -
to
_ enum (24) -
to
_ h (38) -
to
_ hash (36) -
to
_ path (12) -
to
_ proc (46) -
to
_ range (12) -
to
_ s (92) -
to
_ str (36) - tr! (12)
-
tr
_ s! (12) - transact (6)
- transpose (12)
- truncate (12)
- tuesday? (12)
- type (7)
- typekind (12)
-
unalias
_ command (6) -
undef
_ system _ command (6) -
undefine
_ finalizer (12) - undump (8)
- uniq (24)
- uniq! (24)
- unlink (42)
- unscan (12)
- unshift (24)
- untaint (6)
- upcase (12)
- upcase! (12)
- update (132)
- upto (60)
- utc (12)
- utc? (12)
- utime (12)
- value (12)
- value= (12)
- vartype (12)
- verify (12)
- wakeup (12)
- wednesday? (12)
- whitespace (12)
- with (3)
-
with
_ index (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - write (48)
- zero? (12)
- zip (48)
- ~ (12)
- クラス/メソッドの定義 (12)
- パターンマッチ (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- 制御構造 (12)
- 変数と定数 (12)
- 字句構造 (12)
検索結果
先頭5件
-
static VALUE proc
_ invoke(VALUE proc , VALUE args , int pcall , VALUE self) (26332.0) -
Proc オブジェクト proc を起動します。そのとき 引数を args とし、self を self にします。
...
Proc オブジェクト proc を起動します。そのとき
引数を args とし、self を self にします。... -
static VALUE proc
_ eq(VALUE self , VALUE other) (26200.0) -
-
static VALUE proc
_ to _ s(VALUE self , VALUE other) (26200.0) -
-
pp (26018.0)
-
オブジェクトなどを見やすく出力するためのライブラリです。
...このライブラリを require すると Kernel.#pp が定義されます。
Kernel.#p のかわりに Kernel.#pp を使うことにより、
適切にインデントと改行された分かりやすい出力を得ることが出来ます。
pp ライブラリは、ユーザがあたらしく定.......#pp を使う上で余計な作業をする
必要はありません。
=== どちらが読みやすいでしょうか?
p による pretty-print されてない出力:
#<PP:0x81a0d10 @stack=[], @genspace=#<Proc:0x81a0cc0>, @nest=[0], @newline="\n",
@buf=#<PrettyPrint::Group:0x81a0c98 @group=......れているものは
PP のメソッドでもあります。
以下は Hash の pretty printing のカスタマイズの例です。
//emlist[][ruby]{
require 'pp'
class Hash
def pretty_print(q)
q.group(2, "<hash>") do
q.breakable
first = true
self.each{|k, v|
unl......
pp ライブラリは、ユーザがあたらしく定義したクラスに対しても見やすい表示を
するように作られていますので、Kernel.#pp を使う上で余計な作業をする
必要はありません。
=== どちらが読みやすいでしょうか?
p による pre......tty-print されてない出力:
#<PP:0x81a0d10 @stack=[], @genspace=#<Proc:0x81a0cc0>, @nest=[0], @newline="\n",
@buf=#<PrettyPrint::Group:0x81a0c98 @group=0, @tail=0, @buf=[#<PrettyPrint::Gro
up:0x81a0ba8 @group=1, @tail=0, @buf=[#<PrettyPrint::Text:0x81a0b30 @tail=2, @wi
dth=1, @text="["...... PrettyPrint のメソッドとされているものは
PP のメソッドでもあります。
以下は Hash の pretty printing のカスタマイズの例です。
//emlist[][ruby]{
class Hash
def pretty_print(q)
q.group(2, "<hash>") do
q.breakable
first = true
self.eac... -
profile (26012.0)
-
Ruby プログラムのためのプロファイラです。 プロファイラとは効率改善のための調査に用いられるツールのことです。 profile ライブラリは各メソッドの実行時間に関する統計を出力します。
...。
profile ライブラリは各メソッドの実行時間に関する統計を出力します。
profile はそれ自身がオーバーヘッドになる
ためメソッド呼び出しあたりの処理時間がかなり遅くなります。
=== 使い方
以下のように、ruby に -r profi......le オプションを付けて実行します。
$ ruby -r profile foo.rb
foo.rb の実行が終わると標準エラー出力にプロファイルが出力されます。
プロファイルは各メソッドの実行時間に関する統計からなりますが、
この時間には大きく......$ ruby -r profile sample/sieve.rb 1000
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 … 略 …
% cumulative self self total
time seconds seconds calls ms/call ms/call name
33.87 1.49 1.49 11 135.65 214.49 Fixnum#step
31.38... -
TracePoint
# self -> object (21113.0) -
イベントを発生させたオブジェクトを返します。
...イベントを発生させたオブジェクトを返します。
以下のようにする事で同じ値を取得できます。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding......返します。
以下のようにする事で同じ値を取得できます。
なお、self メソッドは binding が nil になる :c_call および :c_return イベントに対しても正しく動作します。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (15322.0) -
Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
@param default_dir self が相対パスであれば default_dir を基準に展開されます。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_......path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (12308.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one perm......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation... -
OpenURI
:: OpenRead # open(mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO (12216.0) -
自身が表すリソースを取得して StringIO オブジェクトとして返します。 OpenURI.open_uri(self, *rest, &block) と同じです。
...自身が表すリソースを取得して StringIO オブジェクトとして返します。
OpenURI.open_uri(self, *rest, &block) と同じです。
ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に Strin......OpenURI::Meta モジュールで extend されています。
@param mode モードを文字列で与えます。Kernel.#open と同じです。
@param perm 無視されます。
@param options ハッシュを与えます。
@raise OpenURI::HTTPError 対象となる URI のスキームが http......。
@raise Net::FTPError 対象となる URI のスキームが ftp であり、かつリソースの取得に失敗した時に
Net::FTPError のサブクラスが発生します。詳しくは net/ftp
を参照して下さい。
@see OpenURI.open_uri...