78件ヒット
[1-78件を表示]
(0.041秒)
別のキーワード
ライブラリ
- ビルトイン (11)
- rubygems (11)
-
rubygems
/ version (18)
クラス
-
Gem
:: Version (7) - UnboundMethod (11)
モジュール
-
Gem
:: QuickLoader (11)
キーワード
- GemVersions (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) - Version (11)
- correct? (7)
-
rubygems
/ commands / specification _ command (11) -
source
_ location (11)
検索結果
先頭5件
-
Gem
:: QuickLoader :: GemVersions -> Hash (12200.0) -
prelude.c で定義されている内部用の定数です。
prelude.c で定義されている内部用の定数です。 -
UnboundMethod
# source _ location -> [String , Integer] | nil (6106.0) -
ソースコードのファイル名と行番号を配列で返します。
...nil を返します。
//emlist[例][ruby]{
require 'time'
Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
//}
@see Proc#source_location, Method#source_location... -
Gem
:: Version (6012.0) -
文字列で表現されたバージョンを比較可能 (Comparable) にするためのクラスです。
...ってしまい、
正しく判定できません。
Gem::Version はこの問題を解決します。
//emlist[文字列での比較と Gem::Version での比較][ruby]{
p "1.9" < "1.10" # => false
p Gem::Version.new("1.9") < Gem::Version.new("1.10") # => true
//}
gem のバージョンを取り......は無関係に使うこともできます。
//emlist[バージョン表記のソートの例][ruby]{
versions = %w[ 1.1 1.10 1.9 1.1.beta9 1.1.beta10 ]
p versions.sort_by{ |v| Gem::Version.new(v) }
# => ["1.1.beta9", "1.1.beta10", "1.1", "1.9", "1.10"]
//}
上の例で、"1.9" と "1.10"... -
rubygems
/ commands / specification _ command (6006.0) -
指定された Gem パッケージの gemspec の情報を YAML 形式で表示するためのライブラリです。
...gem specification [GEMFILE] [options]
Options:
-v, --version VERSION Specify version of gem to examine
--platform PLATFORM Specify the platform of gem to specification
--all Output specifications for all versions of......the gem
Local/Remote Options:
-l, --local 操作をローカルに限定します
-r, --remote 操作をリモートに限定します
-b, --both ローカルとリモートの両方の......操作を許可します
-B, --bulk-threshold COUNT Threshold for switching to bulk
synchronization (default 1000)
--source URL Gem パッケージのリモートリポジトリの URL を指定します
--[no-]ht... -
Gem
:: Version . correct?(version) -> bool (3106.0) -
version が正しいバージョンであれば true を返します。そうでなければ false を返します。
...version が正しいバージョンであれば true を返します。そうでなければ false を返します。
//emlist[][ruby]{
p Gem::Version.correct?("9.1") # => true
p Gem::Version.correct?("incorrect") # => false
p Gem::Version.correct?(nil) # => true
# nil versions are......discouraged and will be deprecated in Rubygems 4
# version が nil のときは true を返しますが、推奨はされず、Ruby 2.6以降では警告がでます。
//}
@param version バージョンを文字列か数値で指定します。... -
NEWS for Ruby 2
. 0 . 0 (114.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...警告しなくなりました
=== 組み込みクラスの更新
* ARGF.class
* 追加: ARGF.class#codepoints, ARGF.class#each_codepoint
IO にある同名のメソッドに対応します
* Array
* 追加: Array#bsearch 二分探索します
* 非互換:
* Array#shuf......に似ています
* 拡張: Hash#default_proc= default proc をクリアするために nil を渡せるようになりました
* IO
* 非推奨: IO#lines, #bytes, #chars, #codepoints
* Kernel
* 追加: Kernel.#Hash という変換メソッド。Kernel.#Array, Kernel.#Float に......LContext#ssl_version to
:TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
:TLSv1_1_client. The version being effectively used can be queried
with OpenSSL::SSL#ssl_version. Furthermore, it is also possible to
blacklist the new TLS versions with OpenSSL::S... -
NEWS for Ruby 2
. 1 . 0 (54.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...i'という接尾辞を付けられるようになりました
//emlist{
# r を付けると有理数になる
42r # => Rational(42, 1)
3.14 # => 3.14.rationalize
6.022e+23r # 指数形式と一緒には使えない
# i を付けると虚数単位 i を掛けた数になる......_defined?
* Enumerable
* 追加: Enumerable#to_h キーと値のペアのリストをハッシュに変換します。
* Exception
* 追加: Exception#cause 一つ前の例外を新しい例外を返します。
例外を rescue して raise しなおしたときに元の例外......al)
* Improved, iterative resolver (compared to RubyGems 2.1 and earlier)
* Support for a sharing a GEM_HOME across ruby platforms and versions
* https://github.com/rubygems/rubygems/tree/master/History.txt
* set
* 追加: Set#intersect?
* 追加: Set#disjoint?
* sock... -
NEWS for Ruby 2
. 7 . 0 (18.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...omparable#clampや定数やDSLなどで便利かもしれません。
14799
//emlist[][ruby]{
ary[..3] # identical to ary[0..3]
case RUBY_VERSION
when ..."2.4" then puts "EOL"
# ...
end
age.clamp(..100)
where(sales: ..100)
//}
* 「$;」にnil以外の値を設定すると警告が出る......重代入でのrescue修飾子が単一の代入と同じ振る舞いになりました。 8279
//emlist[][ruby]{
a, b = raise rescue [1, 2]
# Previously parsed as: (a, b = raise) rescue [1, 2]
# Now parsed as: a, b = (raise rescue [1, 2])
//}
* 特異クラス構文での yield は警......実験的機能の警告を止める例:
//emlist{
$ ruby -e '0 in a'
-e:1: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!
$ ruby -W:no-experimental -e '0 in a'
//}
* RUBYOPTで両方止めるにはスペース区切りで指定します:
//...