るりまサーチ

最速Rubyリファレンスマニュアル検索!
120件ヒット [1-100件を表示] (0.017秒)
トップページ > クエリ:arg[x] > クエリ:join[x]

別のキーワード

  1. _builtin arg
  2. etc sc_arg_max
  3. mkmf arg_config
  4. float arg
  5. numeric arg

検索結果

<< 1 2 > >>

Pathname#join(*args) -> Pathname (18207.0)

与えられたパス名を連結します。

...られたパス名を連結します。

@param args 連結したいディレクトリ名やファイル名を文字列で与えます。

//emlist[例][ruby]{
require "pathname"

path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby...

static VALUE rb_thread_join_m(int argc, VALUE *argv, VALUE thread) (6300.0)

OptionParser#on_tail(*arg, &block) -> self (113.0)

オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。

...の持つリストの最後に登録します。

--version や --help の説明をサマリの最後に表示したい時に便利です。

@param arg OptionParser#on と同様です。

@param block OptionParser#on と同様です。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.n...
..., --help
//}

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end

opts.on_tail("--version", "Show version") do
puts OptionParser::Version.join('.')
exit
end
//}

@see OptionParser#on, OptionParser#on_head...

BasicObject#__send__(name, *args) -> object (112.0)

オブジェクトのメソッド name を args を引数にして呼び出し、メソッドの結果を返します。

...name を args を引数にして呼び出し、メソッドの結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

@param name 呼び出すメソッドの名前。 Symbol または文字列で指定します。
@param args メソッ...
...ドに渡す任意個の引数

//emlist[例][ruby]{
class Mail
def delete(*args)
"(Mail#delete) - delete " + args.join(',')
end
def send(name, *args)
"(Mail#send) - #{name} #{args.join(',')}"
end
end
mail = Mail.new
mail.send :delete, "gentle", "readers" # => "(Mail#send) - de...

BasicObject#__send__(name, *args) { .... } -> object (112.0)

オブジェクトのメソッド name を args を引数にして呼び出し、メソッドの結果を返します。

...name を args を引数にして呼び出し、メソッドの結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

@param name 呼び出すメソッドの名前。 Symbol または文字列で指定します。
@param args メソッ...
...ドに渡す任意個の引数

//emlist[例][ruby]{
class Mail
def delete(*args)
"(Mail#delete) - delete " + args.join(',')
end
def send(name, *args)
"(Mail#send) - #{name} #{args.join(',')}"
end
end
mail = Mail.new
mail.send :delete, "gentle", "readers" # => "(Mail#send) - de...

絞り込み条件を変える

1.6.8から1.8.0への変更点(まとめ) (54.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...ェックがゆるい。break が例外になる。

Proc.new {|a,b,c| p [a,b,c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-...
...=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-linux]
=> -:1: wrong number of arguments (2 for 3) (ArgumentError)...
...) [compat]
ローカル側アドレスを省略可能な第3,4引数で指定できるようになりました。

=== Thread

: ((<Thread#join|Thread/join>)) [compat]

スレッドを待ち合わせる時間を limit で指定できるようになりました。

: ((<Thread/Thread.list>)) [c...

ruby 1.6 feature (48.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...では $; が有効にな
るのは引数省略時だけでした。

$; = ":"
p "a:b:c".split(nil)
=> -:2:in `split': bad separator (ArgumentError)
from -:2
ruby 1.6.7 (2002-03-01) [i586-linux]

=> ruby 1.6.7 (2002-07-30) [i586-linux]
["a", "b", "c"]

: 2...
...p /a#{Regexp.quote("#")}b/x =~ "ab"

=> -:3: warning: ambiguous first argument; make sure
ruby 1.6.7 (2002-03-01) [i586-linux]
"#"
0

=> -:3: warning: ambiguous first argument; make sure
ruby 1.6.7 (2002-07-30) [i586-linux]
"\\...
...$SAFE = 4
a.life -= 1
end.join
p a.life
=> ruby 1.6.4 (2001-06-04) [i586-linux]
6
=> ruby 1.6.4 (2001-08-06) [i586-linux]
-:6:in `life=': Insecure: can't modify Struct (SecurityError)
from -:3:in `join'
from -:3

: ((<String>))#rind...

tsort (24.0)

tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。

...iple]}
@dep[triple] = inputs
end

def build(target)
each_strongly_connected_component_from(target) {|ns|
if ns.length != 1
fs = ns.delete_if {|n| Array === n}
raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}")
end
n = ns.first
if Array...
...end
end
}
end

def tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end

def command(arg)
print arg, "\n"
system arg
end

m = Make.new
m.rule(%w[t1]) { command 'date > t1' }
m.rule(%w[t2]) { command 'date > t2' }
m.rule(%w[t3]) { command 'date > t3...
...分に関するアルゴリズムを使っているからです。
とはいえ strongly_connected_components という正確な名前は長過ぎます。

=== References
R. E. Tarjan,
Depth First Search and Linear Graph Algorithms,
SIAM Journal on Computing, Vol. 1, No. 2, pp. 146-160, June 1972....

Thread#add_trace_func(pr) -> Proc (18.0)

スレッドにトレース用ハンドラを追加します。

...ンドラ(Proc オブジェクト)

//emlist[例][ruby]{
th = Thread.new do
class Trace
end
43.to_s
end
th.add_trace_func lambda {|*arg| p arg }
th.join

# => ["line", "example.rb", 4, nil, #<Binding:0x00007f98e107d0d8>, nil]
# => ["c-call", "example.rb", 4, :inherited, #<Binding:0x00007f98e10...
<< 1 2 > >>