79件ヒット
[1-79件を表示]
(0.037秒)
別のキーワード
種類
- インスタンスメソッド (41)
- 文書 (27)
- 特異メソッド (11)
ライブラリ
- json (11)
- pathname (8)
- resolv (11)
-
rubygems
/ version (11) -
win32
/ registry (11)
クラス
-
Gem
:: Version (11) - Pathname (8)
-
Resolv
:: DNS :: Name (11) -
Win32
:: Registry (11)
モジュール
- JSON (11)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
create
_ id (11) - empty? (8)
- eql? (11)
-
ruby 1
. 8 . 4 feature (11) -
subdomain
_ of? (11)
検索結果
先頭5件
-
Win32
:: Registry # create(subkey , desired = KEY _ ALL _ ACCESS , opt = REG _ OPTION _ RESERVED) (18113.0) -
@todo
...@todo
Win32::Registry.create(self, subkey, desired, opt) と同じです。... -
JSON
. create _ id -> String (6147.0) -
json_create メソッドで使用するクラスを決定するために使用する値を返します。
...son_create メソッドで使用するクラスを決定するために使用する値を返します。
デフォルトは "json_class" です。
//emlist[例][ruby]{
require "json"
class User
attr :id, :name
def initialize(id, name)
@id, @name = id, name
end
def self.json_create(ob......{
JSON.create_id => self.class.name,
"id" => id,
"name" => name,
}
end
def to_json(*)
as_json.to_json
end
end
json = JSON.generate(User.new(1, "tanaka"))
json # => "{\"json_class\":\"User\",\"id\":1,\"name\":\"tanaka\"}"
JSON.parse(json, create_additions: true)... -
Resolv
:: DNS :: Name # subdomain _ of?(other) -> bool (58.0) -
other が self のサブドメインであるかどうかを返します。
...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::D......NS::Name.create("y.z").subdomain_of?(domain) #=> false
p Resolv::DNS::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
//}... -
Pathname
# empty? -> bool (38.0) -
ディレクトリに対しては Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。
...ディレクトリに対しては Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。
//emlist[例 ディレクトリの場合][ruby]{
require "pathname"
require 'tmpdir'
Pathname("/usr/local").empty? # => false
Dir.mktmpdir { |dir| Path......ame(dir).empty? } # => true
//}
//emlist[例 ファイルの場合][ruby]{
require "pathname"
require 'tempfile'
Pathname("testfile").empty? # => false
Tempfile.create("tmp") { |tmp| Pathname(tmp).empty? } # => true
//}
@see Dir.empty?, FileTest.#empty?, Pathname#zero?... -
Gem
:: Version # eql?(other) -> bool (34.0) -
self と other の Gem::Version#version のバージョンが等しいとき true を返します。 そうでなければ false を返します。
...
self と other の Gem::Version#version のバージョンが等しいとき true を返します。
そうでなければ false を返します。
Comparable を include して作られた == と異なり、"1.0" と "1" は異なるものと判定します。
//emlist[][ruby]{
ver0 = Gem::Versi......on.create('1.0') # #<Gem::Version "1.0">
ver1 = Gem::Version.create('1.0') # #<Gem::Version "1.0">
ver2 = Gem::Version.create('1') # #<Gem::Version "1">
p ver0.eql?(ver1) # => true
p ver1.eql?(ver2) # => false
p ver1 == ver2 # => true
//}... -
ruby 1
. 8 . 4 feature (18.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...super
end
end
class Bar
include Foo
def initialize
Foo.instance_method(:initialize).bind(self).call
end
end
Bar.new
# => ruby 1.8.3 (2005-09-21) [i686-linux]
-:3:in `initialize': method `initi......xt.c (MakeX509ExtFactory): should use
# OPENSSL_malloc to allocate X509V3_CTX.
#
# * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): use
# X509V3_EXT_nconf_nid to avoid SEGV (and to build extensions which
# values are placed in separate section).
#
#......題を修正。((<ruby-dev:27513>))
# == 不要
#
#Mon Nov 28 09:21:49 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
#
# * lib/mkmf.rb (create_makefile): should not change sodir with
# dir.gsub!. (bccwin32 failed to install third party exntesions)
# [ruby-dev:27834]
#
#な... -
NEWS for Ruby 2
. 1 . 0 (12.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...クラスの祖先はそれ自身を含みます。
The ancestors of a singleton class now include singleton classes,
in particular itself.
* Module#define_method Object#define_singleton_method
* 定義したメソッドの名前をシンボルで返すようになりました。......うになりました。
* Proc
* Returning from lambda proc now always exits from the Proc, not from the
method where the lambda is created. Returning from non-lambda proc exits
from the method, same as the former behavior.
* String
* 以下のコードでレシーバー......名前付きキャプチャをサポートしました
* syslog/logger
* ファイリティを追加
* tempfile
* 追加: Tempfile.create
* timeout
* 明示的に例外クラスを指定しない限り、ブロックを抜けるための例外はブロック内部で rescue... -
NEWS for Ruby 2
. 7 . 0 (12.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...で呼び出すと
例外が発生するようになりました。
//emlist[][ruby]{
def bar
lambda
end
bar { puts "Hello" } #=> tried to create Proc object without a block (ArgumentError)
//}
==== その他の変更
* 始端なしRangeが実験的に導入されました。
caseやC......うな場所にコメントを書けるようになりました。
//emlist[][ruby]{
foo
# .bar
.baz # => foo.baz
//}
* リテラルの「self」をレシーバーとしたプライベートメソッド呼び出しが
できるようになりました。 11297 16123
* 多重代入で...