772件ヒット
[701-772件を表示]
(0.118秒)
種類
ライブラリ
- English (12)
- ビルトイン (209)
- logger (1)
- open-uri (4)
- psych (14)
-
rake
/ testtask (24) - ripper (12)
-
rubygems
/ installer (48) -
rubygems
/ user _ interaction (24) - syslog (264)
-
syslog
/ logger (12)
クラス
-
Gem
:: Installer (48) -
Gem
:: StreamUI (12) - Hash (36)
- Integer (33)
- Module (24)
- Proc (14)
-
Rake
:: TestTask (24) - Ripper (12)
- String (12)
- Struct (4)
-
Syslog
:: Logger (12)
モジュール
-
Gem
:: UserInteraction (12) - Kernel (62)
- Psych (14)
- Syslog (168)
-
Syslog
:: Level (96) - Warning (31)
キーワード
-
$ IGNORECASE (12) - ** (11)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Application (1)
-
LOG
_ ALERT (12) -
LOG
_ CRIT (12) -
LOG
_ DEBUG (12) -
LOG
_ EMERG (12) -
LOG
_ ERR (12) -
LOG
_ INFO (12) -
LOG
_ NOTICE (12) -
LOG
_ WARNING (12) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Rubyの起動 (6)
- Warning (9)
- [] (7)
- []= (6)
- alert (12)
-
alert
_ warning (24) - categories (1)
-
cgi
/ session (12) -
const
_ set (12) - crit (12)
- debug (12)
-
deprecate
_ constant (12) - emerg (12)
- err (12)
- error (12)
- fetch (36)
-
home
_ install _ warning (12) -
home
_ install _ warning= (12) - info (12)
- lambda (18)
- mask (12)
- mask= (12)
- new (17)
- notice (12)
- open (28)
- open! (12)
-
path
_ warning (12) -
path
_ warning= (12) - pow (22)
- proc (19)
- reopen (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
safe
_ load (14) -
to
_ f (12) - warn (27)
- warning= (12)
-
warning
_ unless _ e _ option (12) - クラス/メソッドの定義 (12)
- パターンマッチ (9)
- 制御構造 (12)
- 演算子式 (1)
検索結果
-
Rubyの起動 (36.0)
-
Rubyの起動 * cmd_option * shebang
...Rubyの起動
* cmd_option
* shebang
Rubyインタプリタの起動は以下の書式のコマンドラインにより行います。
ruby [ option ...] [ -- ] [ programfile ] [ argument ...]
ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプシ......りを明示するため
に使用できます。programfile は、Ruby スクリプトを記述したファイ
ルです。これを省略したり`-' を指定した場合には標準入力を Ruby ス
クリプトとみなします。
programfile が `#!' で始まるファイルである場合......(デフォルト)
* -W:experimental : 実験的な機能を使用した際に警告を出力する(デフォルト)
* -W:no-experimental : 実験的な機能を使用した際に警告を出力しない
//}
ここで設定された値は Warning.[] で参照することができます... -
NEWS for Ruby 2
. 4 . 0 (30.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...エントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.3.0 以降の変更
=== 言語仕様の変更
* 条件式での多重代入......うになりました 10617
* Symbol#to_proc でメソッド呼び出し元での Refinements が有効になりました 9451
* Object#send や BasicObject#__send__ でメソッドを呼び出したときに Refinements が有効になりました 11476
* 後置 rescue をメソッドの引......case, Symbol#capitalize, Symbol#swapcase は
全ての Unicode に対して動作するようになりました。10085
* Thread
* Thread#report_on_exception, Thread.report_on_exception を追加 6647
* TracePoint
* TracePoint#callee_id を追加 12747
* Warning
* Warning... -
cgi
/ session (30.0) -
CGI のセッション管理を行うライブラリ。
...キーを使用してもいいですが、
この cgi/session を使用した方がよりわかりやすいでしょう。
セッション情報は Hash ライクなインターフェースです。
セッションはセッション ID とプログラムが記録した
セッション情報から......ion['name'] = "value"
CGI::Session オブジェクトは Hash のようなもので、キーに対応する値を記録します。
デフォルトではプログラム終了時にセッション情報はファイルに記録されます。
=== 使い方 (セッション情報を得る)
name =......に(warning は出ます)
@cmd = 'start' if @cmd.empty?
@header = { "type" => "text/html", "charset" => "euc-jp" }
__send__("cmd_#{@cmd}")
end
def cmd_start
@cgi.out(@header) {
<<-END
<html><head><title>CGI::Session Demo</title></head>... -
Proc
. new -> Proc (18.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。
ブロックを指定しなけ......& 引数でうけるべきです。
@raise ArgumentError スタック上にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これは以下と同......foo
yield(1)
end
foo {|arg| p arg }
# => 1
//}
呼び出し元のメソッドがブロックを伴わなければ、例外
ArgumentError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# f... -
Proc
. new { . . . } -> Proc (18.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。
ブロックを指定しなけ......& 引数でうけるべきです。
@raise ArgumentError スタック上にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これは以下と同......foo
yield(1)
end
foo {|arg| p arg }
# => 1
//}
呼び出し元のメソッドがブロックを伴わなければ、例外
ArgumentError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# f... -
Integer
# **(other) -> Numeric (12.0) -
算術演算子。冪(べき乗)を計算します。
...param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@ra......ise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が......になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other) -> Numeric (12.0) -
算術演算子。冪(べき乗)を計算します。
...param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@ra......ise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が......になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other , modulo) -> Integer (12.0) -
算術演算子。冪(べき乗)を計算します。
...param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@ra......ise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が......になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power...