729件ヒット
[1-100件を表示]
(0.044秒)
別のキーワード
ライブラリ
- ビルトイン (527)
- bigdecimal (12)
-
irb
/ cmd / help (12) -
json
/ add / exception (12) -
net
/ http (12) - resolv (12)
- socket (12)
クラス
- BigDecimal (12)
- Data (6)
- Dir (24)
- Exception (44)
-
IRB
:: ExtendCommand :: Help (12) - Integer (12)
- Module (36)
- Numeric (12)
- Object (12)
- Proc (14)
-
Resolv
:: DNS :: Name (12) -
RubyVM
:: InstructionSequence (72) - Socket (12)
- Struct (48)
- Thread (24)
-
Thread
:: Backtrace :: Location (36) - TracePoint (7)
モジュール
- Kernel (120)
-
Net
:: HTTPHeader (12)
オブジェクト
- main (24)
キーワード
- Enumerator (12)
- Fiber (12)
- Location (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (4) - Ruby用語集 (12)
- [] (20)
- abort (12)
-
at
_ exit (12) - autoload (12)
-
backtrace
_ locations (36) -
base
_ label (24) - caller (36)
-
caller
_ locations (24) -
compile
_ file (12) - define (6)
- disasm (12)
- disassemble (12)
- execute (12)
- gethostbyname (12)
- gets (12)
- glob (16)
- include (12)
- inspect (12)
-
instruction
_ sequence (7) - irb (12)
- label (12)
- logger (12)
-
main
_ type (12) - new (50)
- rdoc (12)
- readline (12)
- readlines (12)
- refine (12)
- remainder (36)
-
respond
_ to? (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) -
set
_ backtrace (12) -
subdomain
_ of? (12) -
to
_ a (12) -
to
_ json (12) -
to
_ s (12) - using (24)
- 正規表現 (12)
検索結果
先頭5件
-
main (38030.0)
-
トップレベルでの self を表すオブジェクトです。
...トップレベルでの self を表すオブジェクトです。
main では参照できない事に注意してください。トップレベルで self から参照してください。
トップレベルで定義したメソッドは Object の private インスタンスメソッドと
して......ップレベルで定義したメソッドの確認][ruby]{
basic_private_methods = private_methods(false)
basic_public_methods = public_methods(false)
private def explicit_private_method
end
# トップレベルで定義したメソッドは main オブジェクトの private メソッドと し......method
end
public def explicit_public_method
end
# main オブジェクトで独自定義した private method のみを取得する
p private_methods(false) - basic_private_methods
# => [:explicit_private_method, :implicit_private_method]
# main オブジェクトで独自定義した public met... -
main
. using(module) -> self (21012.0) -
引数で指定したモジュールで定義された拡張を有効にします。
...範囲については以下を参照してください。
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope
@param module 有効にするモジュールを指定します。
//emlist[例][ruby]{
module Sloth
refine String do
def downcase
self
end
e... -
main
. include(*modules) -> self (21006.0) -
引数 modules で指定したモジュールを後ろから順番に Object にインクルードします。
...odules Module のインスタンス( Enumerable など)を指定します。
@raise ArgumentError 継承関係が循環してしまうような include を行った場
合に発生します。
//emlist[例:][ruby]{
include Math
hypot(3, 4) # => 5.0
//}
@see Module#include... -
Net
:: HTTPHeader # main _ type -> String|nil (6113.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
...タイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.main_type # => "text"
//}... -
BigDecimal
# remainder(n) -> BigDecimal (6106.0) -
self を n で割った余りを返します。
...す。
@param n self を割る数を指定します。
//emlist[][ruby]{
require 'bigdecimal'
x = BigDecimal((2**100).to_s)
x.remainder(3).to_i # => 1
(-x).remainder(3).to_i # => -1
x.remainder(-3).to_i # => 1
(-x).remainder(-3).to_i # => -1
//}
戻り値は self と同じ符号になり......ます。これは BigDecimal#% とは異な
る点に注意してください。詳細は Numeric#%、
Numeric#remainder を参照して下さい。... -
Integer
# remainder(other) -> Numeric (6106.0) -
self を other で割った余り r を返します。
...す。
@param other self を割る数。
//emlist[][ruby]{
5.remainder(3) # => 2
-5.remainder(3) # => -2
5.remainder(-3) # => 2
-5.remainder(-3) # => -2
-1234567890987654321.remainder(13731) # => -6966
-1234567890987654321.remainder(13731.24) # => -9906.22531493148
//}
@see Inte... -
Numeric
# remainder(other) -> Numeric (6106.0) -
self を other で割った余り r を返します。
...other 自身を割る数を指定します。
//emlist[例][ruby]{
p 13.remainder(4) #=> 1
p (11.5).remainder(3.5) #=> 1.0
p 13.remainder(-4) #=> 1
p (-13).remainder(4) #=> -1
p (-13).remainder(-4) #=> -1
p (-11).remainder(3.5) #=> -0.5
//}
@see Numeric#divmod, Numeric#modulo... -
Resolv
:: DNS :: Name # subdomain _ of?(other) -> bool (6106.0) -
other が self のサブドメインであるかどうかを返します。
...ます。
//emlist[][ruby]{
require "resolv"
domain = Resolv::DNS::Name.create("y.z")
p Resolv::DNS::Name.create("w.x.y.z").subdomain_of?(domain) #=> true
p Resolv::DNS::Name.create("x.y.z").subdomain_of?(domain) #=> true
p Resolv::DNS::Name.create("y.z").subdomain_of?(domain) #=> false
p Resolv::D......NS::Name.create("z").subdomain_of?(domain) #=> false
p Resolv::DNS::Name.create("x.y.z.").subdomain_of?(domain) #=> false
p Resolv::DNS::Name.create("w.z").subdomain_of?(domain) #=> false
//}... -
ruby 1
. 6 feature (5221.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) ->......EWOULDBLOCK
=> ruby 1.6.7 (2002-03-01) [i586-linux]
Errno::EAGAIN
Errno::EWOULDBLOCK
=> ruby 1.6.8 (2002-12-24) [i586-linux]
Errno::EAGAIN
-:2: uninitialized constant EWOULDBLOCK at Errno (NameError)
=> ruby 1.6.8 (2003-02-13) [i......((<ruby-bugs-ja:PR#122>))
p(-1[-1])
=> ruby 1.6.5 (2001-09-19) [i586-linux]
1
=> ruby 1.6.5 (2001-11-01) [i586-linux]
1
: Numeric#remainder
((<ruby-bugs-ja:PR#110>))
p( 3.remainder(-3))
p(-3.remainder(3))
=> ruby 1.6.5...