るりまサーチ

最速Rubyリファレンスマニュアル検索!
94件ヒット [1-94件を表示] (0.022秒)

別のキーワード

  1. shell/builtin-command new
  2. etc sc_shell
  3. shell/builtin-command each
  4. shell notify
  5. shell cd

検索結果

Shell::SystemCommand#start -> () (21101.0)

@todo

@todo

Shell::ProcessController#start_job(command = nil) (9101.0)

指定されたコマンドの実行を開始します。

指定されたコマンドの実行を開始します。

コマンドを省略した場合は、待ち状態のジョブのうち先頭のものを実行します。

@param command コマンドを指定します。

Shell::SystemCommand#start_export (9101.0)

@todo

@todo

Shell::SystemCommand#start_import -> () (9101.0)

@todo

@todo

Open3.#pipeline_start(*cmds) -> [Thread] (6114.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。

...境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., o...
...待つためのスレッ
ドの配列を返します。

例:

require "open3"

# xeyesを10秒だけ実行する。
Open3.pipeline_start("xeyes") {|ts|
sleep 10
t = ts[0]
Process.kill("TERM", t.pid)
p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
}

@...

絞り込み条件を変える

Open3.#pipeline_start(*cmds) {|wait_thrs| ... } -> () (6114.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。

...境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., o...
...待つためのスレッ
ドの配列を返します。

例:

require "open3"

# xeyesを10秒だけ実行する。
Open3.pipeline_start("xeyes") {|ts|
sleep 10
t = ts[0]
Process.kill("TERM", t.pid)
p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
}

@...

ruby 1.6 feature (36.0)

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

...了しない不具合が修正さ
れました。((<ruby-bugs-ja:PR#223>))

trap(:TERM, "EXIT")

END{
puts "exit"
}

Thread.start { Thread.stop }
sleep

: 2002-04-17: Regexp#inspect

((<ruby-bugs-ja:PR#222>))

p %r{\/}

=> ruby 1.6.7 (2002-03-01) [i586-linux]...
...もので上書きされてしまっていました。
((<ruby-dev:14743>))

def foo(t)
t.run
end

t = Thread.start do
t = $_= "sub"
loop{Thread.stop;puts "sub:#$_"}
end

$_ = "main"
t.run # => sub:sub...
...ify frozen string (TypeError)

%w(foo bar bar baz).uniq[0].upcase!
=> -:1:in `upcase!': can't modify frozen string (TypeError)

: ((<shell>))

shell
0.6 が標準ライブラリとして新規に追加されました。
(ドキュメントが doc ディレクトリにあります)

:...

Timeout.#timeout(sec, exception_class = nil) {|i| ... } -> object (30.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

...t が割り込めない
require 'timeout'
require 'socket'

t = 0.1
start
= Time.now
begin
Timeout.timeout(t) {
p TCPSocket.gethostbyname("www.ruby-lang.org")
# (A)
}
ensure
p Time.now - start
end
# 実行例
=> ["helium.ruby-lang.org", [], 2, "210.251.121.2...
...コマンドのタイムアウト
require 'timeout'

# テスト用のシェルをつくる。
File.open("loop.sh", "w"){|fp|
fp.print <<SHELL_EOT
#!/bin/bash

S="scale=10"
M=32767

trap 'echo "$S; $m1/($m1+$m2)*4" | bc ; echo "count = $((m1+m2))" ; exit 0' INT
m1=0
m2=0

whi...
...M/$M)"
c=$(echo "$S;$x^2+$y^2 < 1.0" | bc)
echo $x $y $c
if [ $c -eq 1 ]
then
let m1++
else
let m2++
fi
done
SHELL
_EOT
}

File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout.timeout(t) {...

Timeout.#timeout(sec, exception_class, message) {|i| ... } -> object (30.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

...t が割り込めない
require 'timeout'
require 'socket'

t = 0.1
start
= Time.now
begin
Timeout.timeout(t) {
p TCPSocket.gethostbyname("www.ruby-lang.org")
# (A)
}
ensure
p Time.now - start
end
# 実行例
=> ["helium.ruby-lang.org", [], 2, "210.251.121.2...
...コマンドのタイムアウト
require 'timeout'

# テスト用のシェルをつくる。
File.open("loop.sh", "w"){|fp|
fp.print <<SHELL_EOT
#!/bin/bash

S="scale=10"
M=32767

trap 'echo "$S; $m1/($m1+$m2)*4" | bc ; echo "count = $((m1+m2))" ; exit 0' INT
m1=0
m2=0

whi...
...M/$M)"
c=$(echo "$S;$x^2+$y^2 < 1.0" | bc)
echo $x $y $c
if [ $c -eq 1 ]
then
let m1++
else
let m2++
fi
done
SHELL
_EOT
}

File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout.timeout(t) {...

NEWS for Ruby 2.7.0 (24.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...た。 15195
* Unicode絵文字のバージョンが12.1に更新されました。 16272

* Symbol
* 新規メソッド
* Symbol#start_with?とSymbol#end_with?が追加されました。 16348

* Time
* 新規メソッド
* Time#ceilが追加されました。 15772...
...ためのNet::FTP#featuresと
有効/無効にするためのNet::FTP#optionが追加されました。 15964

* Net::HTTP
* Net::HTTP#startにTCP/IP接続のアドレスを置き換えるための
オプション引数ipaddrが追加されました。 5180

* Net::IMAP
* Ser...
...機能を使う場合は対応する gem をインストールしてください。
* CMath (cmath gem)
* Scanf (scanf gem)
* Shell (shell gem)
* Synchronizer (sync gem)
* ThreadsWait (thwait gem)
* E2MM (e2mmap gem)

* Proc
* Proc#to_sの形式が変更さ...

絞り込み条件を変える

NEWS for Ruby 2.6.0 (18.0)

NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...い換えるとオーバーヘッドがなくなります。
* 新規オプション
* :oneshot_lines キーワード引数が Coverage.start に追加されました。
* :stop と :clear キーワード引数が Coverage.result に追加されました。
clear が真の時...
...ました。
* e2mmap
* forwardable
* irb
* logger
* matrix
* mutex_m
* ostruct
* prime
* rexml
* rss
* shell
* sync
* thwait
* tracer

* BigDecimal
* 以下のメソッドが削除されました。
* BigDecimal.allocate
* Bi...
...b.com/ruby/ruby/pull/1779

* pthread プラットフォームでスレッドキャッシュを有効にしました。
(Thread.new と Thread.start) 14757

* POSIX タイマーのあるプラットフォームでタイマースレッドが取り除かれました。 14937

* Transient Heap...