るりまサーチ

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

ライブラリ

クラス

キーワード

検索結果

IO#closed? -> bool (18135.0)

self が完全に(読み込み用と書き込み用の両方が)クローズされている場合に true を返します。 そうでない場合は false を返します。

...
self
が完全に(読み込み用と書き込み用の両方が)クローズされている場合に true を返します。
そうでない場合は false を返します。

//emlist[例][ruby]{
IO.write("testfile", "test")
f = File.new("testfile")
f.close # => nil
f.closed? # => tr...
...ue
f = IO.popen("/bin/sh","r+")
f.close_write # => nil
f.closed? # => false
f.close_read # => nil
f.closed? # => true
//}

@see IO#close, IO#close_read, IO#close_write...

Thread::SizedQueue#close -> self (113.0)

キューを close します。詳しくは Thread::Queue#close を参照してください。

...追加するスレッドを待機している場合は
ClosedQueueError が発生して中断されます。

//emlist[例][ruby]{
q = SizedQueue.new(4)

[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }

q.closed? # => false
q.close
q.closed? # => true
//}

@see Thread::Queue#close...

ruby 1.8.3 feature (30.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...r' for #<Object:0x4021b0a0> (NoMethodError)

$ ruby-1.8.3 -r delegate test_dlg.rb
bar

=== 2005-06-20
: DBM#closed? [lib] [new]
: GDBM#closed? [lib] [new]
: SDBM#closed? [lib] [new]

=== 2005-06-16

: Time.parse [lib] [compat]

うるう秒 "Fri Jan 1 08:59:60 +0900 1999" をサポー...
...101 #=> @@foo は Fred クラスのクラス変数ではない。
end

def Fred.foo_foo
class_variable_set(:@@foo, 101) # self が Fred クラス自身であることに注意。クラス変数 @@foo に値をセットする。
end

Fred.foo # メソ...
...singleton class [ruby] [change]
特異クラスは複製できなくなりました。((<ruby-talk:142749>))

$ ruby-1.8.3 -e 'class << "str"; self end.dup'
-e:1:in `initialize_copy': can't copy singleton class (TypeError)
from -e:1

=== 2005-05-15
: Pathname#unlink [lib] [comp...

IO#close_on_exec=(bool) (18.0)

自身に close-on-exec フラグを設定します。

...2)
@param bool 自身の close-on-exec フラグを true か false で指定します。

f = open("/dev/null")
f.close_on_exec = true
system("cat", "/proc/self/fd/#{f.fileno}") # cat: /proc/self/fd/3: No such file or directory
f.closed? #=> false

@see IO#close_on_exec?...