るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

ライブラリ

クラス

検索結果

Exception#cause -> Exception | nil (21207.0)

self の前の例外(self が rescue 節や ensure 節の中で発生した例外の場合、 その前に発生していた元々の例外)を返します。存在しない場合は nil を返し ます。

...その前に発生していた元々の例外)を返します。存在しない場合は nil を返し
ます。

//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
p $! # => #<RuntimeError: outer>
p $!.cause # => #<RuntimeError: inner>
end
//}...

IO#autoclose=(bool) (9030.0)

auto-close フラグを設定します。

...close しません。

@param bool 真偽値でフラグを設定します
@see IO#autoclose?

f = open("/dev/null")
IO
.for_fd(f.fileno)
# ...
f.gets # may cause Errno::EBADF

f = open("/dev/null")
IO
.for_fd(f.fileno).autoclose = false
# ...
f.gets # won't cause Errno::EBADF...

CSV.new(data, options = Hash.new) -> CSV (140.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...このメソッドは CSV ファイルを読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。

ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用し...
...した StringIO を渡してください。

@param data String か IO のインスタンスを指定します。
String のインスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。

@param options CSV を...
...is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
note that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-ending translation can cause
problems with resetting the document position to where it...

NEWS for Ruby 3.0.0 (78.0)

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

...ated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs...
...by]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ......
...ce_locations provide per-fiber backtrace. 16815
* The limitation of Fiber#transfer is relaxed. 17221
* GC
* GC.auto_compact= and GC.auto_compact have been added to control when compaction runs. Setting `auto_compact=` to `true` will cause compaction to occur during major collections. At...

NEWS for Ruby 2.1.0 (54.0)

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

...i'という接尾辞を付けられるようになりました
//emlist{
# r を付けると有理数になる
42r # => Rational(42, 1)
3.14 # => 3.14.rationalize
6.022e+23r # 指数形式と一緒には使えない

# i を付けると虚数単位 i を掛けた数になる...
...fined?

* Enumerable
* 追加: Enumerable#to_h キーと値のペアのリストをハッシュに変換します。

* Exception
* 追加: Exception#cause 一つ前の例外を新しい例外を返します。
例外を rescue して raise しなおしたときに元の例外が...
...、基数変換、GCD

* IO
* 拡張: IO#seek SEEK_DATA と SEEK_HOLE を whence としてサポートしました??
* 拡張: IO#seek 第2引数としてシンボルを受け付けるようになりました (:CUR, :END, :SET, :DATA, :HOLE)
* 拡張: IO#read_nonblock シンボル...

絞り込み条件を変える

NEWS for Ruby 2.6.0 (12.0)

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

...れるときに、
例外の Exception#cause も表示されるようになりました。 8257

* フリップフロップが非推奨になりました。 5400

=== 組み込みクラスの更新

* Array
* 新規メソッド
* Array#union と Array#difference 14097
* 変更...
...* Array#filter! が Array#select! の別名として追加されました。 13784

* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。
...
...取り、環境変数名と値のペアを新しいキーと値に変換できるようになりました。 15143

* Exception
* 新規オプション
* Exception#full_message が :highlight と :order を受け付けるようになりました。 14324

* Hash
* 変更された...