るりまサーチ

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

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. _builtin nil
  5. object nil

ライブラリ

クラス

検索結果

<< 1 2 > >>

Thread.pass -> nil (18226.0)

他のスレッドに実行権を譲ります。実行中のスレッドの状態を変えずに、 他の実行可能状態のスレッドに制御を移します。

...権を譲ります。実行中のスレッドの状態を変えずに、
他の実行可能状態のスレッドに制御を移します。

Thread.new do
(1..3).each{|i|
p i
Thread.pass
}
exit
end


loop do
Thread.pass
p :main
end


#=>
1
:main
2
:main
3
:main...

Thread.pending_interrupt?(error = nil) -> bool (6231.0)

非同期割り込みのキューが空かどうかを返します。

...immediate) {
Thread.pass
}
end


=== 使い方

th = Thread.new{
Thread.handle_interrupt(RuntimeError => :on_blocking){
while true
...
# ここまでで割り込みが発生しても安全な状態になった。
if Thread.pending_interrupt?
T...
...hread.handle_interrupt(Object => :immediate){}
end

...
end

}
}
...
th.raise # スレッド停止。

この例は以下のように記述する事もできます。

flag = true
th = Thread.new{
Thread.handle_interrupt(RuntimeError => :on_blocking){
whil...
...e true
...
# ここまでで割り込みが発生しても安全な状態になった。
break if flag == false
...
end

}
}
...
flag = false # スレッド停止

@see Thread#pending_interrupt?, Thread.handle_interrupt...

ruby 1.6 feature (570.0)

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

... nil
を返すようになりました。(String#[]やString#slice と同じ結果を返すと
いうことです)

p "foo".slice!("bar") # <- 以前からこちらは nil を返していた
p "foo".slice!(5,10)

=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
...
...ーになっていました。
((<ruby-dev:17155>))

open("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end

}

=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex IO for writing (IOError)
from -:3...
...append_character}))
のアクセサ。(この変数は GNU readline 2.1 以降で使えます)
((<ruby-ext:01760>))

: ((<Socket::Constants>))

ソケット関連の定数のうち以下が新規に追加されました(システムに定義さ
れている場合に限る)。

SO_PASSCRE...

Net::POP3.start(address, port = nil, account=nil, password=nil, isapop=false) -> Net::POP3 (418.0)

Net::POP3 オブジェクトを生成し、サーバへ接続します。

...返り値となります。

port に nil を渡すと、適当なポート(通常は110、SSL利用時には 995)を
使います。

以下のコードと同じ動作をします。
require 'net/pop'

Net::POP3.new(address, port, isapop).start(account, password)

使用例:

require 'net/pop...
...t(addr, port, account, password) {|pop|
pop.each_mail do |m|
file.write m.pop
m.delete
end

}

@param address POP3サーバのホスト名文字列
@param port 接続するPOP3サーバのポート番号
@param account アカウント名文字列
@param password パスワード...

Net::POP3.start(address, port = nil, account=nil, password=nil, isapop=false) {|pop| .... } -> object (418.0)

Net::POP3 オブジェクトを生成し、サーバへ接続します。

...返り値となります。

port に nil を渡すと、適当なポート(通常は110、SSL利用時には 995)を
使います。

以下のコードと同じ動作をします。
require 'net/pop'

Net::POP3.new(address, port, isapop).start(account, password)

使用例:

require 'net/pop...
...t(addr, port, account, password) {|pop|
pop.each_mail do |m|
file.write m.pop
m.delete
end

}

@param address POP3サーバのホスト名文字列
@param port 接続するPOP3サーバのポート番号
@param account アカウント名文字列
@param password パスワード...

絞り込み条件を変える

Net::POP3.delete_all(address, port = nil, account, password, isapop=false) -> () (220.0)

POP セッションを開始し、サーバ上のメールを全て消去します。

...として渡されます。

port に nil を渡すと、適当なポート(通常は110、SSL利用時には 995)を
使います。

使用例:

require 'net/pop'

Net::POP3.delete_all(addr, nil, 'YourAccount', 'YourPassword') do |m|
puts m.pop
end


@param address POP3サーバのホス...
...ト名文字列
@param port 接続するPOP3サーバのポート番号
@param account アカウント名文字列
@param password パスワード文字列
@param isapop 真でAPOPを利用します

@raise TimeoutError 接続がタイムアウトした場合に発生します
@raise Net::POPAuthent...

Net::POP3.delete_all(address, port = nil, account, password, isapop=false) {|mail| .... } -> () (220.0)

POP セッションを開始し、サーバ上のメールを全て消去します。

...として渡されます。

port に nil を渡すと、適当なポート(通常は110、SSL利用時には 995)を
使います。

使用例:

require 'net/pop'

Net::POP3.delete_all(addr, nil, 'YourAccount', 'YourPassword') do |m|
puts m.pop
end


@param address POP3サーバのホス...
...ト名文字列
@param port 接続するPOP3サーバのポート番号
@param account アカウント名文字列
@param password パスワード文字列
@param isapop 真でAPOPを利用します

@raise TimeoutError 接続がタイムアウトした場合に発生します
@raise Net::POPAuthent...

Net::POP3.foreach(address, port = nil, account, password, isapop=false) {|mail| .... } -> () (219.0)

POP セッションを開始し、 サーバ上のすべてのメールを取りだし、 個々のメールを引数としてブロックを呼びだします。

...t に nil を渡すと、適当なポート(通常は110、SSL利用時には 995)を
使います。

以下のコードと同様の処理をします。
require 'net/pop'

Net::POP3.start(address, port, account, password, isapop=false) {|pop|
pop.each_mail do |m|
yield m
end

}...
...'YourAccount', 'YourPassword') do |m|
file.write m.pop
m.delete if $DELETE
end


@param address POP3サーバのホスト名文字列
@param port 接続するPOP3サーバのポート番号
@param account アカウント名文字列
@param password パスワード文字列
@pa...

Module#ruby2_keywords(method_name, ...) -> nil (119.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.

...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 argument...
...at 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.

This should only be used for methods that delegate keywords to another
method, and only for backwards comp...
...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

ruby2_keywords(:foo) if respond_to?(:ruby2_keywords, true)
end

//}...

ruby 1.8.4 feature (90.0)

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

...re/Array#fill [bug]>))
* ((<ruby 1.8.4 feature/String#scan [bug]>))
* ((<ruby 1.8.4 feature/File.join [bug]>))
* ((<ruby 1.8.4 feature/Thread#pass [bug]>))
* ((<ruby 1.8.4 feature/Module#const_missing [bug]>))
* ((<ruby 1.8.4 feature/IO [bug]>))
* ((<ruby 1.8.4 feature/添付ライブラ...
...適合する文字列を厳密にした。((<ruby-core:03573>)),((<ruby-dev:27478>))

1) alias :"foo" :"bar"

def bar; p "bar"; end
alias :"foo" :"bar"
foo

# => ruby 1.8.4 (2005-12-22) [i686-linux]
-:2: syntax error, unexpecte...
...z]+x[0-9]+$/ =~ "hogex111")
p(/^[\x61-\x7a]+x[0-9]+$/ =~ "hogex111")

# => ruby 1.8.3 (2005-09-21) [i686-linux]
0
nil

# => ruby 1.8.4 (2005-12-22) [i686-linux]
0
0

: シグナル [bug]

#Sun Oct 16 03:38:07 2005 Yukihiro M...

絞り込み条件を変える

<< 1 2 > >>