キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Marshal フォーマット (11)
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Ruby用語集 (11)
- pack テンプレート文字列 (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - sprintf フォーマット (11)
- このマニュアルのヘルプ (11)
- セキュリティモデル (8)
検索結果
-
Ruby用語集 (121.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...大きな整数オブジェクトが属す
クラスだった。Ruby 2.4 で Fixnum と共に Integer に一本化された。
このとき Bignum は形式的には残されたが単なる Integer のエイリアスとなった。
: blade
Ruby の各種メーリングリストのアーカイ......く実装するための手法の一つ。
例えば新しい数値クラス N を定義し、Integer と N の演算を可能にしたいとする。
Integer と N の加算を行うと、Integer 側では相手が未知のため、自身を引数に
まず相手側の N#coerce を呼ぶ。N......し、切り替えて使うための
ツールの一つ。Linux、macOS などで動作する。
https://github.com/rbenv/rbenv
: RD(Ruby Document format)
Ruby スクリプト中に記述することを念頭に作られたドキュメントフォーマット。
: RDoc
Ruby スクリ... -
NEWS for Ruby 2
. 4 . 0 (103.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...加 12512
* Integer
* Fixnum と Bignum は Integer に統合されました 12005
* Integer#ceil, Integer#floor, Integer#truncate は
Integer#round と同じように省略可能な桁を指定する引数を受け付けるようになりました 12245
* Integer#digits を追......加。 12447
位置記法のために各桁を展開するためのメソッドです。
* Integer#round は half というキーワード引数を受け付けるようになりました。
half には :even, :up, :down が指定可能です。 12548 12958 12953
* IO
* IO#gets......の実装と完全に互換性を保つことは不可能です。
* FixnumとBignumはIntegerに統合されました。12005
FixnumクラスとBignumクラスは削除されました。
Integerクラスは抽象クラスから具象クラスに変更されました。
Cレベルの... -
NEWS for Ruby 2
. 5 . 0 (67.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...う。 13405
* Integer
* Integer#round, Integer#floor, Integer#ceil, Integer#truncate は常に Integer を返すようになりました
13420
* Integer#pow を追加 12508 11003
* Integer#allbits?, Integer#anybits?, Integer#nobits? を追加 12753
* Integer.sqrt を追加......his much improves the speed of generating documents.
* It also facilitates supporting new syntax in the future.
* Support many new syntaxes of Ruby from the past few years.
* Use "frozen_string_literal: true".
This reduces document generation time by 5%.
* Support d... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (31.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...リテラルの prefix として 0d が追加されました。
8進リテラルの prefix として 0 以外に 0o が追加されました。
Integer(), String#to_i、String#oct もこの prefix を認識します。
: ((<メソッド引数の & 修飾|メソッド呼び出し/イテレー......ストでブロックを実行するように
なりました。
=== Numeric
: ((<Numeric#step|Numeric/step>)) [compat]
((<Fixnum>)), ((<Integer>)) から移動しました。
=== Object
: ((<Object#singleton_methods|Object/singleton_methods>)) [compat]
省略可能な引数 all......emExit#initialize|SystemExit/SystemExit.new>)) [compat]
引数が追加されました。
: ((<String#to_i|String/to_i>)) [compat]
: ((<Integer#to_s|Integer/to_s>)) [compat]
引数に基数(2,8,10,16)を指定できるようになりました。
(2002-01-26: 引数が 0 のときは prefix... -
NEWS for Ruby 2
. 2 . 0 (31.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...しました 9502
* Check_SafeStr -> SafeStringValue
* rb_check_safe_str -> SafeStringValue
* rb_quad_pack -> rb_integer_pack
* rb_quad_unpack -> rb_integer_unpack
* rb_read_check : access struct FILE internal. no replacement.
* rb_struct_iv_get : internal function. no repla......ig2ulong_pack -> rb_integer_pack
* rb_gc_set_params : internal function. no replacement.
* rb_io_mode_flags -> rb_io_modestr_fmode
* rb_io_modenum_flags -> rb_io_oflags_fmode
* struct RBignum は隠されました 6083
かわりに rb_integer_pack と rb_integer_unpack を使い... -
NEWS for Ruby 3
. 1 . 0 (31.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...をミリ秒で返します。 10917
* GC.total_time が計測された時間をナノ秒で返します。 10917
* Integer
* 新規メソッド
* Integer.try_convert が追加されました。 15211
* Kernel
* 変更されたメソッド
* Kernel#load が第2引数......り厳密に整数に変換されるようになりました。
//emlist[Time.new][ruby]{
Time.new(2021, 12, 25, "+07:30")
#=> invalid value for Integer(): "+07:30" (ArgumentError)
//}
* Ruby 3.0 以前では、予期しない結果の 2021-12-25 07:00:00 が返されました。 2021-12-25......s://github.com/ruby/rbs/pull/844
//emlist{
# `T` must be compatible with the `_Output` interface.
# `PrettyPrint[String]` is ok, but `PrettyPrint[Integer]` is a type error.
class PrettyPrint[T < _Output]
interface _Output
def <<: (String) -> void
end
attr_reader output: T
def initiali... -
ruby 1
. 9 feature (31.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...の文字列に対し、その文字のコードを返すメソッドが追加されました
: string[integer] が 1文字の String を返すようになりました
: string.slice(integer) が 1文字の String を返すようになりました
: ?c が 1文字の String を返すように......プションの追加
((<ruby-dev:28417>))
=== 2006-02-15
: instance_eval
((<ruby-core:7365>))
=== 2006-02-03
: Integer#upto [compat]
: Integer#downto [compat]
: Integer#doitems [compat]
ブロックがなければ enumerator を返す
: Enumerable#group_by [new]
: Enumerable#first... -
NEWS for Ruby 3
. 0 . 0 (25.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...redirected to a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modi......heir 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 later......test.rb
def foo(x)
if x > 10
x.to_s
else
nil
end
end
foo(42)
//}
//emlist{
$ typeprof test.rb
# Classes
class Object
def foo : (Integer) -> String?
end
//}
== Miscellaneous changes
* Methods using `ruby2_keywords` will no longer keep empty keyword splats, those are now removed... -
pack テンプレート文字列 (25.0)
-
pack テンプレート文字列
...] # 仮数部
//}
そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23......,52] # 仮数部
//}
そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-5... -
ruby 1
. 6 feature (25.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...from -:2
ruby 1.6.7 (2002-07-30) [i586-linux]
: 2002-06-03 sprintf()
"%d" で引数を整数にするときに、((<組み込み関数/Integer>)) と同じ規則を
使用するようになりました。
p sprintf("%d", nil)
=> -:1:in `sprintf': no implicit conversio......:in `remove_instance_variable': instance variable @foo not defined (NameError)
ruby 1.6.7 (2002-04-10) [i586-linux]
: 2002-04-04: Integer#((<Integer/step>))
第二引数が 1 よりも小さい場合に 0 を指定したと見なされエラーになって
いました。
1.ste......5 (2001-11-01) [i586-linux]
true
false # ここでは実行環境がLinuxなので ALT_SEPARATOR は nil
true
: Integer[nth]
大きな値のインデックスに対して例外が発生していました。
((<ruby-bugs-ja:PR#114>))
p(-1[10000000000])... -
ruby 1
. 8 . 4 feature (25.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...:35 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * sprintf.c (rb_str_format): integer overflow check added.
#
# * sprintf.c (GETASTER): ditto.
printfのフォーマット指定子にinteger overflowのバグがありました。
perl のそれとは違い、セキュリテ......サンプル兼ライブラリ
#Wed Dec 7 01:02:04 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
#
# * ext/tk/README.macosx-aqua: [new document] tips to avoid the known
# bug on platform specific dialogs of Tcl/Tk Aqua on MacOS X.
MacOS X 上で Aqua 版の Tcl/Tk を用いた......values have VALUE type. there is an environment where sizeof(VALUE)
# != sizeof(int) like IA64. if 32bit integer (Qtrue) is passed to ANYARGS
# and received by 64bit integer (VALUE), upper bits may have garbage value.
# [ruby-dev:27513]
IA64 で、Qtrue Qfalse Qnil が 6... -
NEWS for Ruby 2
. 7 . 0 (19.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...エンコーディングを設定する
IO#set_encoding_by_bomメソッドが追加されました。 15210
* Integer
* 変更されたメソッド
* Integer#[] がRangeを受け付けるようになりました。 8842
//emlist[][ruby]{
0b01001101[2, 4] #=> 0b0011
0b01001100[......yの上流リポジトリはSubversionからGitに変わりました。
* https://git.ruby-lang.org/ruby.git
* RUBY_REVISIONのクラスはIntegerからStringに変わりました。
* RUBY_DESCRIPTIONはSubversionのリビジョンの代わりにGitのリビジョンが
入るよ...