るりまサーチ

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

別のキーワード

  1. process setrlimit
  2. process abort
  3. process fork
  4. tracer display_process_id
  5. tracer display_process_id=

検索結果

Shell::CommandProcessor#truncate(path, length) -> 0 (21107.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate...

File#flock(operation) -> 0 | false (66.0)

ファイルをロックします。

...f.flush
f.truncate(f.pos)
}

# 読み込みロック(read lock)を使用してカウンタを読み込み。
File.open("counter", "r") {|f|
f.flock(File::LOCK_SH)
p f.read
}
//}

//emlist[例2:][ruby]{
f = File.open("/tmp/foo", "w")

f.flock(File::LOCK_EX)
puts "locked by process1"

fork {...
...d by process2"
sleep 5
puts "unlocked by process2"
}

sleep 5

f.flock(File::LOCK_UN)
puts "unlocked by process1"
sleep 1 # <- 子プロセスが確実に先にロックするための sleep
f.flock(File::LOCK_EX)
puts "re-locked by process1"

# => locked by process1
# unlocked by process1
#...
...locked by process2
# unlocked by process2
# re-locked by process1
//}...

セキュリティモデル (48.0)

セキュリティモデル RubyにはCGI等のプログラミングを安全に行うことを助ける為に、セキュリティ 機構が備わっています。

...umask File.truncate
File#lstat File#chmod File#chown File.delete File.unlink
File#truncate File#flock
および FileTest モジュールのメソッド
* IO#ioctl, IO#fcntl
* Process.fork Process.#setpgid Process.#setsid
Process
.#setpriority Process.#egid= Process.#kill...

NEWS for Ruby 2.5.0 (36.0)

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

...readable_real?, File.writable?, File.writable_real?,
File.executable?, File.executable_real?, File.mkfifo, File.readlink,
File.truncate, File#truncate, File.chmod, File.lchmod, File.chown,
File.lchown, File.unlink, File.utime, File.lstat はGVLを解放するようになりまし...
...ージはユーザーにとってわかりやすいでしょう。 13405

* Integer
* Integer#round, Integer#floor, Integer#ceil, Integer#truncate は常に Integer を返すようになりました
13420
* Integer#pow を追加 12508 11003
* Integer#allbits?, Integer#anybits?, I...
...なりました。
coerceがnilを返す場合、変換は不可能です。7688

* Process
* getrusage(2) が存在する場合 Process.#times の精度を改良しました 11952
* Process.last_status を追加。$? と同じです 14043

* Range
* Range.new no longer hides e...

NEWS for Ruby 2.4.0 (24.0)

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

.../pull/1186
* Enumerator::Lazy#uniq を追加 11090

* File
* File.empty? を追加 9969

* Float
* Float#ceil, Float#floor, Float#truncate
Float#roundと同じように省略可能な桁を指定する引数を受け付けるようになりました。12245
* Float#roun...
...alues! を追加 12512

* Integer
* Fixnum と Bignum は Integer に統合されました 12005
* Integer#ceil, Integer#floor, Integer#truncate
Integer#round と同じように省略可能な桁を指定する引数を受け付けるようになりました 12245
* Integer#d...
...ようになりました 12534
* Module.used_modules を追加 7418

* Numeric
* Numeric#finite?, Numeric#infinite? を追加 12039

* Process
* macOS 10.12 から導入された CLOCK_MONOTONIC_RAW_APPROX, CLOCK_UPTIME_RAW,
CLOCK_UPTIME_RAW_APPROX をサポートしました...

絞り込み条件を変える