るりまサーチ

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

別のキーワード

  1. object true
  2. _builtin true
  3. rb_true
  4. true object
  5. true _builtin

検索結果

<< 1 2 3 > >>

Fiber.current -> Fiber (18125.0)

このメソッドが評価されたコンテキストにおける Fiber のインスタンスを返します。

...のメソッドが評価されたコンテキストにおける Fiber のインスタンスを返します。

//emlist[例:][ruby]{
fr = Fiber.new do
Fiber.current
end

fb = fr.resume
p fb.equal?(fr) # => true

p Fiber.current # => #<Fiber:0x91345e4>
p Fiber.current # => #<Fiber:0x91345e4>
//}...

ruby 1.6 feature (108.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...とみなされるようになりました。

p Hash.new("foo") == Hash.new("bar")

=> ruby 1.6.7 (2002-03-01) [i586-linux]
true

=> ruby 1.6.7 (2002-08-21) [i586-linux]
false

# : 2002-08-01 IO#read, gets ..., etc.
#
# File::NONBLOCK を指定した...
...-01)

: 2002-02-20 true/false/nil の特異メソッド定義

これら擬似変数に特異クラス定義形式で特異メソッドを定義できるようにな
りました。

class <<true
def foo
"foo"
end
end
p true.foo
=> -...
.../lib/ruby/$ver/$arch/foo.so
./foo.rb
./foo.so

The previous behavior had a potential security risk because a
foo.rb (if exists) in the current directory is located prior to a
foo.so in $prefix/lib/ruby/site_ruby/$ver/$arch.

((<ruby-bugs:PR#140>)), ((<ruby-ext:01778>)), ((<ruby-dev:1...

NEWS for Ruby 3.0.0 (78.0)

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

...redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in` is changed to return `true` or `false`. 17371

//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...
...PERIMENTAL]
16746

//emlist{
def square(x) = x * x
//}

* Interpolated String literals are no longer frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc...
...ocking operations and Fiber.scheduler for accessing the current scheduler. See rdoc-ref:fiber.md for more details about what operations are supported and how to implement the scheduler hooks. 16786
* Fiber.blocking? tells whether the current execution context is blocking. 16786
* Thread#join...

irb (60.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...~/.irbrc を読み込まない
-m bc モード (分数と行列の計算ができる)
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-r library ruby -r と同じ...
...:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:MATH_MODE] = false
IRB.conf...
...中の irb インタプリタの設定を表示・変更できます。

: cwws
: pwws
: irb_cwws
: irb_pwws
: irb_print_working_workspace
: irb_current_working_binding
: irb_print_working_binding
: irb_cwb
: irb_pwb

irb の self を返します。

: cws(*obj)
: chws(*obj)
: irb_cws(*obj)
: irb_...
...インオプション

irb [options] file_name opts
options:
-f ~/.irbrc を読み込まない
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-r library ruby -r と同じ
-I...
..._EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:SINGLE_IRB] = false
IRB.conf[:SAVE_HISTORY] = nil
IRB.conf[:USE_LOADER] = true
IRB...
...EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:SINGLE_IRB] = false
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:USE_LOADER] = true
IRB...

NEWS for Ruby 2.0.0 (36.0)

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

...ます
:close_others オプションのデフォルト値を true に変更しました
* 非互換: respond_to? は protected なメソッドに対して false を返します。第2引数に true を指定すると true を返します。
* 非互換: Kernel.#__callee__ はオリジ...
...* added method:
* added main.define_method which defines a global function.
* added main.using, which imports refinements into the current file or
eval string. [experimental]

=== 組み込みクラスの互換性 (機能追加とバグ修正を除く)

* Array#values_at...
...* Signal.trap
* 上を参照

* Onigmo をマージしました。
https://github.com/k-takata/Onigmo

* The :close_others option is true by default for system() and exec().
Also, the close-on-exec flag is set by default for all new file descriptors.
This means file descripto...

絞り込み条件を変える

ruby 1.8.4 feature (36.0)

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

...#
# * win32.h, win32.c (rb_w32_osid): check the running platform.

i-nodeを持たないシステム(Windows等)でtest(?-, ...)が常にtrueを返し
ていたバグを修正。((<ruby-core:06672>))

: File.identical? [new]
: FileTest.identical? [new]

test(?-, ...) の代替メ...
...18 12:18:02 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
#
# * win32/win32.h (S_IFIFO): r,w = IO.pipe; r.stat.pipe? now
# returns true on VisualC++6.

VisualC++ 6 では S_IFIFO がなく _S_IFIFO しか定義されていないため、
パイプに対する stat.pipe? が...
...ruby-dev:27818>))

: optparse

#Tue Nov 22 23:52:06 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * lib/optparse.rb: match incomplete (in current enconding) multibyte
# string. http://inamode6.tokuhirom.dnsalias.org/show/1551

$KCODEで無効なマルチバイト文字列や、...

パターンマッチ (34.0)

パターンマッチ * patterns * variable_binding * variable_pinning * matching_non_primitive_objects * guard_clauses * current_feature_status * pattern_syntax * some_undefined_behavior_examples

...パターンマッチ
* patterns
* variable_binding
* variable_pinning
* matching_non_primitive_objects
* guard_clauses
* current_feature_status
* pattern_syntax
* some_undefined_behavior_examples

パターンマッチは、構造化された値に対して、構造をチェック...
...ion>; in <pattern>; true; else false; end』 と等価です。
パターンにマッチするかどうかだけを知りたいときに使えます。

//emlist{
users = [{name: "Alice", age: 12}, {name: "Bob", age: 23}]
users.any? {|user| user in {name: /B/, age: 20..} } #=> true
//}

構文の詳...
...less も利用できます。

//emlist[][ruby]{
case [1, 1]
in a, b unless b == a*2
"matched"
else
"not matched"
end
#=> "matched"
//}

===[a:current_feature_status] 機能の現状

Ruby 3.0 の時点では、1行パターンマッチ と Find パターンは 「実験的機能」 扱いです...
...less も利用できます。

//emlist[][ruby]{
case [1, 1]
in a, b unless b == a*2
"matched"
else
"not matched"
end
#=> "matched"
//}

===[a:current_feature_status] 機能の現状

Ruby 3.1 の時点では、Find パターンは 「実験的機能」 扱いです。Find パターンの構文...
...less も利用できます。

//emlist[][ruby]{
case [1, 1]
in a, b unless b == a*2
"matched"
else
"not matched"
end
#=> "matched"
//}

===[a:current_feature_status] 機能の現状


===[a:pattern_syntax] 付記A: パターンのシンタックス

おおよその構文は以下のとおりで...

Thread#alive? -> bool (28.0)

スレッドが「生きている」時、true を返します。

...スレッドが「生きている」時、true を返します。

例:
thr = Thread.new { }
thr.join # => #<Thread:0x401b3fb0 dead>
Thread.current.alive? # => true
thr.alive? # => false

Thread#status が真を返すなら、このメソッドも真です。...

Thread#key?(name) -> bool (28.0)

name に対応したスレッドに固有のデータが定義されていれば true を返します。

...name に対応したスレッドに固有のデータが定義されていれば
true
を返します。

@param name 文字列か Symbol で指定します。

//emlist[例][ruby]{
me = Thread.current
me[:oliver] = "a"
me.key?(:oliver) # => true
me.key?(:stanley) # => false
//}...

Thread#stop? -> bool (28.0)

スレッドが終了(dead)あるいは停止(stop)している時、true を返します。

...スレッドが終了(dead)あるいは停止(stop)している時、true を返します。

//emlist[例][ruby]{
a = Thread.new { Thread.stop }
b = Thread.current
a.stop? # => true
b.stop? # => false
//}

@see Thread#alive?, Thread#status...

絞り込み条件を変える

<< 1 2 3 > >>