るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

検索結果

<< 1 2 > >>

Matrix.empty(row_size=0, column_size=0) -> Matrix (18219.0)

要素を持たない行列を返します。

...ruby]{
require 'matrix'
m = Matrix.empty(2, 0)
m == Matrix[ [], [] ]
# => true
n = Matrix.empty(0, 3)
n == Matrix.columns([ [], [], [] ])
# => true
m * n
# => Matrix[[0, 0, 0], [0, 0, 0]]
//}

@param row_size 行列の行数
@param column_size 行列の列数
@raise ArgumentError row_size, column_si...

Object#must_be_empty -> true (6219.0)

自身が空である場合、検査にパスしたことになります。

...が空である場合、検査にパスしたことになります。

@raise MiniTest::Assertion 自身が empty? メソッドを持たない場合に発生します。
また、自身が空でない場合にも発生します。

@see MiniTest::Assertions#assert_empty...

MiniTest::Assertions#assert_empty(object, message = nil) -> true (6213.0)

与えられたオブジェクトが空である場合、検査にパスしたことになります。

...か Proc を指定します。Proc である場合は Proc#call した
結果を使用します。

@raise MiniTest::Assertion 与えられたオブジェクトが empty? メソッドを持たない場合に発生します。
また、与えられたオブ...

FileTest.#empty?(file) -> bool (6207.0)

ファイルが存在して、そのサイズが 0 である時に真を返します。 そうでない場合、あるいはシステムコールに失敗した場合には false を返します。

...に失敗した場合には false を返します。

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。

//emlist[例:][ruby]{
IO.write("zer...

FileTest.#zero?(file) -> bool (3107.0)

ファイルが存在して、そのサイズが 0 である時に真を返します。 そうでない場合、あるいはシステムコールに失敗した場合には false を返します。

...に失敗した場合には false を返します。

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。

//emlist[例:][ruby]{
IO.write("zer...

絞り込み条件を変える

ruby 1.8.4 feature (1488.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響の範囲が小さいと思われる変更もこちら
* [change]: 変更されたクラス/メソッドなど(互換...
....y (dsym): prohibit empty symbol literal by interpolation.
# fixed: [ruby-talk:166529]

式展開で空のSymbolを作ることができたバグの修正。 ((<ruby-talk:166529>))

p :""

# => ruby 1.8.3 (2005-09-21) [i686-linux]
-
:1: empty symbol literal...
...last_error().
# [ruby-dev:27597]
#
# * ext/openssl/ossl.c (ossl_raise): ditto.
#
# ?

#Mon Oct 31 05:49:23 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
#
# * ext/openssl/ossl_cipher.c (ossl_cipher_update): input data must
# not be empty. [ruby-talk:161220]
#
# * tes...

NEWS for Ruby 3.0.0 (312.0)

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

...mlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in...
...emlist{
0 => a
p a #=> 0

{b: 0, c: 1} => {b:}
p b #=> 0
//}

//emlist{
# version 3.0
0 in 1 #=> false

# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}

* Find-pattern is added. [EXPERIMENTAL]
16828

//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, Strin...
...=== `--help` option

When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754

=== `--backtrace-limit` option

The `--backtrace-limit...

Matrix#antisymmetric? -> bool (142.0)

行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。

...true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します

//emlist[][ruby]{
require 'matrix'

Matrix[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix.empty.antisymmetric? # => true

Mat...
...rix[[1, 2, 3], [4, 5, 6], [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}...

Matrix#skew_symmetric? -> bool (142.0)

行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。

...true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します

//emlist[][ruby]{
require 'matrix'

Matrix[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix.empty.antisymmetric? # => true

Mat...
...rix[[1, 2, 3], [4, 5, 6], [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}...

NEWS for Ruby 2.0.0 (132.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました...
...m

* openssl
* Consistently raise an error when trying to encode nil values. All instances
of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
raise
NoMethodError in the same case....
...A user-defined callback
may be set which gets called whenever a new handshake is negotiated. This
also allows to programmatically decline (client) renegotiation attempts.
* Support for "0/n" splitting of records as BEAST mitigation via
OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGME...

絞り込み条件を変える

NEWS for Ruby 2.5.0 (126.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.4.0 以降の変更

=== 言語仕様の変更

* トップレベルの定数参照を削除...
...引数を追加しました 13056
* Dir.chdir (ブロックなしで呼び出した場合), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
Dir.empty? はGVLを解放するようになりました
* Dir.children を追加 11302
* Dir.each_child を追加 11302

* Enumerable
* Enume...
...and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688

* Regexp
* Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05 に更新
* 非包含オペレータ(absence operator)をサポート https://github.com/k-tak...

IO.read(path, **opt) -> String | nil (124.0)

path で指定されたファイルを offset 位置から length バイト分読み込んで返します。

...使われるオプションをキーワード引数で指定します。

@raise Errno::EXXX path のオープン、offset 位置への設定、ファイルの読み込みに失敗した場合に発生します。

@raise ArgumentError length が負の場合に発生します。

キーワード引...
...の他、 :external_encoding など
IO.open のオプション引数が指定できます。

@see IO.binread

例:

IO.read(empty_file) #=> ""
IO.read(empty_file, 1) #=> nil
IO.read(one_byte_file, 0, 10) #=> ""
IO.read(one_byte_file, nil, 10) #=> ""
IO.read(one_byt...

IO.read(path, length = nil, **opt) -> String | nil (124.0)

path で指定されたファイルを offset 位置から length バイト分読み込んで返します。

...使われるオプションをキーワード引数で指定します。

@raise Errno::EXXX path のオープン、offset 位置への設定、ファイルの読み込みに失敗した場合に発生します。

@raise ArgumentError length が負の場合に発生します。

キーワード引...
...の他、 :external_encoding など
IO.open のオプション引数が指定できます。

@see IO.binread

例:

IO.read(empty_file) #=> ""
IO.read(empty_file, 1) #=> nil
IO.read(one_byte_file, 0, 10) #=> ""
IO.read(one_byte_file, nil, 10) #=> ""
IO.read(one_byt...

IO.read(path, length = nil, offset = 0, **opt) -> String | nil (124.0)

path で指定されたファイルを offset 位置から length バイト分読み込んで返します。

...使われるオプションをキーワード引数で指定します。

@raise Errno::EXXX path のオープン、offset 位置への設定、ファイルの読み込みに失敗した場合に発生します。

@raise ArgumentError length が負の場合に発生します。

キーワード引...
...の他、 :external_encoding など
IO.open のオプション引数が指定できます。

@see IO.binread

例:

IO.read(empty_file) #=> ""
IO.read(empty_file, 1) #=> nil
IO.read(one_byte_file, 0, 10) #=> ""
IO.read(one_byte_file, nil, 10) #=> ""
IO.read(one_byt...
<< 1 2 > >>