るりまサーチ

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

別のキーワード

  1. object then
  2. _builtin then
  3. then object
  4. then _builtin

検索結果

<< < 1 2 3 4 > >>

Proc#call(*arg) -> () (25.0)

手続きオブジェクトを実行してその結果を返します。

...hen lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1
//}

また、以下のような syntactic sugar もあります。

//emlist[例][ruby]{
fib = lambda{|n|
case n
when 0 then 0
when 1 then 1
else
fib.(n...

Proc#yield(*arg) -> () (25.0)

手続きオブジェクトを実行してその結果を返します。

...hen lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1
//}

また、以下のような syntactic sugar もあります。

//emlist[例][ruby]{
fib = lambda{|n|
case n
when 0 then 0
when 1 then 1
else
fib.(n...

Range#===(obj) -> bool (19.0)

始端と終端の中に obj があるとき、true を返します。 そうでないとき、false を返します。

...す。

//emlist[例][ruby]{
p (0...50) === 79 #=> false
p (60...80) === 79 #=> true

case 79
when 0...60 then puts "low"
when 60...80 then puts "medium" # => medium
when 80..100 then puts "high"
end
//}

2.5 以前は、単純に Range#include? メソッドを内部で呼んでいました...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (17.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

...e 'X' is positive integer if the +type+ is
unsigned, or negative integer if the +type+ is signed.

For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS...

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (17.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

...e 'X' is positive integer if the +type+ is
unsigned, or negative integer if the +type+ is signed.

For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS...

絞り込み条件を変える

Kernel#convertible_int(type, headers = nil, opts = nil) (17.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

...'=X' where 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.

For example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:

#define TYPEOF_FOOBAR_T unsigned long
#define FOOBART2NUM U...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (17.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

...'=X' where 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.

For example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:

#define TYPEOF_FOOBAR_T unsigned long
#define FOOBART2NUM U...

RDoc::Context#find_symbol(symbol, method=nil) (17.0)

Look up the given symbol. If method is non-nil, then we assume the symbol references a module that contains that method

...Look up the given symbol. If method is non-nil, then we assume
the symbol references a module that contains that method...

Gem::DependencyList#dependency_order -> [Gem::Specification] (13.0)

依存する Gem の数が少ない順にソートされた Gem::Specification のリストを返します。

...の問題を回避することができます。

If there are circular dependencies (yuck!), then gems will be
returned in order until only the circular dependents and anything
they reference are left. Then arbitrary gemspecs will be returned
until the circular dependency is broken, after which ge...

Rake::FileList#exclude(*patterns) {|entry| ... } -> self (13.0)

自身から取り除くべきファイル名のパターンを自身の除外リストに登録します。

...例:
FileList['a.c', 'b.c'].exclude("a.c") # => ['b.c']
FileList['a.c', 'b.c'].exclude(/^a/) # => ['b.c']

# If "a.c" is a file, then ...
FileList['a.c', 'b.c'].exclude("a.*") # => ['b.c']

# If "a.c" is not a file, then ...
FileList['a.c', 'b.c'].exclude("a.*") # => ['a.c', 'b.c']...

絞り込み条件を変える

<< < 1 2 3 4 > >>