別のキーワード
種類
- インスタンスメソッド (50)
- 特異メソッド (22)
- 文書 (4)
ライブラリ
- ビルトイン (38)
-
minitest
/ unit (1) -
webrick
/ httpservlet / abstract (33)
クラス
モジュール
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) -
absolute
_ path (22) -
assert
_ in _ epsilon (1) -
do
_ OPTIONS (11) -
get
_ instance (11) - magnitude (8)
- new (11)
検索結果
先頭5件
-
Rational
# abs -> Rational (21213.0) -
自身の絶対値を返します。
...自身の絶対値を返します。
//emlist[例][ruby]{
Rational(1, 2).abs # => (1/2)
Rational(-1, 2).abs # => (1/2)
//}... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (9100.0) -
self が表す命令シーケンスの絶対パスを返します。
...ctionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionS......equence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
Thread
:: Backtrace :: Location # absolute _ path -> String (9100.0) -
self が表すフレームの絶対パスを返します。
...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path... -
Rational
# magnitude -> Rational (6113.0) -
自身の絶対値を返します。
...自身の絶対値を返します。
//emlist[例][ruby]{
Rational(1, 2).abs # => (1/2)
Rational(-1, 2).abs # => (1/2)
//}... -
WEBrick
:: HTTPServlet :: AbstractServlet # do _ OPTIONS(request , response) -> () (6100.0) -
自身の service メソッドから HTTP のリクエストに応じて 呼ばれるメソッドです。AbstractServlet のサブクラスはこれらのメソッドを適切に実装し なければいけません。返り値は特に規定されていません。
...自身の service メソッドから HTTP のリクエストに応じて
呼ばれるメソッドです。AbstractServlet のサブクラスはこれらのメソッドを適切に実装し
なければいけません。返り値は特に規定されていません。
クライアントが使う可......のレスポンスを表す WEBrick::HTTPResponse オブジェクトです。
例:
require 'webrick'
class HogeServlet < WEBrick::HTTPServlet::AbstractServlet
def do_GET(req, res)
res.body = 'hoge'
end
end
srv = WEBrick::HTTPServer.new({ :DocumentRoot => './',... -
WEBrick
:: HTTPServlet :: AbstractServlet . get _ instance(server , *options) -> WEBrick :: HTTPServlet :: AbstractServlet (3200.0) -
new(server, *options) を呼び出してサーブレットを生成して返します。 WEBrick::HTTPServer オブジェクトは実際にはこの get_instance メソッドを呼び出して サーブレットを生成します。
...new(server, *options) を呼び出してサーブレットを生成して返します。
WEBrick::HTTPServer オブジェクトは実際にはこの get_instance メソッドを呼び出して
サーブレットを生成します。
特に理由が無い限り AbstractServlet のサブクラスが......このメソッドを再定義する必要はありません。
@param server WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのまま与えられます。
@param options WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのまま与えられます。... -
WEBrick
:: HTTPServlet :: AbstractServlet . new(server , *options) -> WEBrick :: HTTPServlet :: AbstractServlet (3200.0) -
サーブレットを生成して返します。 WEBrick::HTTPServer オブジェクトは server に自身を指定してサーブレットを生成します。
...server に自身を指定してサーブレットを生成します。
@param server サーブレットを生成する WEBrick::HTTPServer オブジェクトを指定します。
@param options WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのまま与えられます。... -
MiniTest
:: Assertions # assert _ in _ epsilon(actual , expected , epsilon = 0 . 001 , message = nil) -> true (3006.0) -
与えられた期待値と実際の値の相対誤差が許容範囲内である場合、検査にパスしたことになります。
...す。
言い換えると以下の式が真である場合、検査をパスします。
[expected, actual].min * epsilon >= (extected - actual).abs
@param expected 期待値を指定します。
@param actual 実際の値を指定します。
@param epsilon 許容する相対誤差を指定......sage 検査に失敗した場合に表示するメッセージを指定します。
文字列か Proc を指定します。Proc である場合は Proc#call した
結果を使用します。
@raise MiniTest::Assertion 検査に失敗した場合に発生します。... -
NEWS for Ruby 3
. 0 . 0 (78.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs......by]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]
pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, .........and their subclasses.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`, `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader methods for 10th or...