るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

FalseClass#&(other) -> false (18149.0)

常に false を返します。

...

&
は再定義可能な演算子に分類されていますので、通常は false & other の形で使われます。

//emlist[例][ruby]{
p false & true #=> false
p false & false #=> false
p false & nil #=> false
p false & (1 == 1) #=> false
p false & (1 + 1) #=> false

p false.&(...
...true) #=> false
p false.&(false) #=> false
p false.&(nil) #=> false
p false.&(1 == 1) #=> false
p false.&(1 + 1) #=> false
//}...

TrueClass#&(other) -> bool (18149.0)

other が真なら true を, 偽なら false を返します。

...

&
は再定義可能な演算子に分類されていますので、通常は true & other のように使われます。

//emlist[例][ruby]{
p true & true #=> true
p true & false #=> false
p true & nil #=> false
p true & (1 == 1) #=> true
p true & (1 + 1) #=> true

p true.&(true...
...) #=> true
p true.&(false) #=> false
p true.&(nil) #=> false
p true.&(1 == 1) #=> true
p true.&(1 + 1) #=> true
//}...

NilClass#&(other) -> false (18131.0)

常に false を返します。

...常に false を返します。

@param other 論理積を行なう式です

//emlist[例][ruby]{
nil & true # => false
nil & false # => false
nil & nil # => false
nil & "a" # => false
//}...

Integer#&(other) -> Integer (18119.0)

ビット二項演算子。論理積を計算します。

...ビット二項演算子。論理積を計算します。

@param other 数値

//emlist[][ruby]{
1 & 1 # => 1
2 & 3 # => 2
//}...

Array#&(other) -> Array (18113.0)

集合の積演算です。両方の配列に含まれる要素からなる新しい配列を返 します。重複する要素は取り除かれます。

...ッドによ
る暗黙の型変換を試みます。

@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
[1, 1, 2, 3] & [3, 1, 4] #=> [1, 3]
//}

@see Array#|...
...る暗黙の型変換を試みます。

@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
[1, 1, 2, 3] & [3, 1, 4] #=> [1, 3]
//}

@see Array#|, Array#intersection...

絞り込み条件を変える

Set#&(enum) -> Set (18113.0)

共通部分、すなわち、2つの集合のいずれにも属するすべての要素からなる 新しい集合を作ります。

...が定義されたオブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
require 'set'
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 50]
p s1 & s2 #=> #<Set: {10, 30}>
//}

@see Array#&...
...ブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
require 'set'
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 50]
p s1 & s2 #=> #<Set: {10, 30}>
//}

@see Array#&, Array#intersection...
...義されたオブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 50]
p s1 & s2 #=> #<Set: {10, 30}>
//}

@see Array#&, Array#intersection...

Module#ruby2_keywords(method_name, ...) -> nil (6144.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...ate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the module responds to this method befo...
...aware that if this method is removed, the behavior of the
method will change so that it does not pass through keywords.

//emlist[例][ruby]{
module Mod
def foo(meth, *args, &block)
send(:"do_#{meth}", *args, &block)
end
ruby
2_keywords(:foo) if respond_to?(:ruby2_keywords, true)
end
//}...

Proc#ruby2_keywords -> proc (6144.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.

...ate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before...
...so, be aware that if this method is removed, the behavior of the
proc will change so that it does not pass through keywords.

//emlist[][ruby]{
module Mod
foo = ->(meth, *args, &block) do
send(:"do_#{meth}", *args, &block)
end
foo.ruby2_keywords if foo.respond_to?(:ruby2_keywords)
end
//}...

Set#intersection(enum) -> Set (3013.0)

共通部分、すなわち、2つの集合のいずれにも属するすべての要素からなる 新しい集合を作ります。

...が定義されたオブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
require 'set'
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 50]
p s1 & s2 #=> #<Set: {10, 30}>
//}

@see Array#&...
...ブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
require 'set'
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 50]
p s1 & s2 #=> #<Set: {10, 30}>
//}

@see Array#&, Array#intersection...
...義されたオブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 50]
p s1 & s2 #=> #<Set: {10, 30}>
//}

@see Array#&, Array#intersection...
<< 1 2 3 ... > >>