ライブラリ
- ビルトイン (11)
クラス
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (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) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (18143.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_binding@(irb)>
# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: Ruby......str = 'a' + 'b' }
# irb
> require '/tmp/iseq_of.rb'
# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>
# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSeq... -
NEWS for Ruby 3
. 0 . 0 (204.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...nt behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])
# 2.7 => [[1],......ted String literals are no longer frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc......'--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}
* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* Conditi... -
ruby 1
. 8 . 4 feature (96.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...05 Guy Decoux <ts@moulon.inra.fr>
#
# * re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
# [ruby-core:06721]
sizeof(long) > sizeof(int) な環境で、ハッシュ関数のオーバー
フローのためにStringをキーとしたHashの検索が失敗していたバ......(<ruby-core:06721>))
: test [bug]
#Wed Nov 23 01:22:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * file.c (test_identical): test if two files are identical.
#
# * file.c (rb_f_test): support DOSISH systems where st_ino is not
# reliable. fixed: [ruby-core:06672]
#
#......[ruby-dev:27560] [ruby-core:4627]
#
# ?
#Sat Oct 8 20:04:40 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666]
#
# メソッドの追加。不要。
#Sat Oct 8 20:04:40 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
#... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (60.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への変更点(まとめ)/サポートプラットフォームの追加>))
...引数チェックがゆるい。break が例外になる。
Proc.new {|a,b,c| p [a,b,c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002......c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-linux]
=> -:1: wrong number of arguments (2 for 3) (ArgumentError)......on_method_removed>)) [new]
: ((<Object#singleton_method_undefined|Object/singleton_method_undefined>)) [new]
追加
=== Proc
: ((<Proc#binding|Proc/binding>)) [new]
追加
: ((<Proc#to_proc|Proc/to_proc>)) [new]
追加
# : ((<Precision>)).included [new]
#
# 追加(((<Module#incl... -
ruby 1
. 6 feature (60.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...返していた
p "foo".slice!(5,10)
=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
-:2:in `slice!': index 5 out of string (IndexError)
from -:2
=> ruby 1.6.7 (2002-08-01) [i586-linux]
nil
nil
: 2002-07-05 String#spli......lose_write
else
sleep 1
end
}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex IO for writing (IOError)
from -:3
from -:1:in `open'
from -:1
=> ruby 1.6.7 (2002-07-30) [i586-linux]
: 2002-......001-10-15) [i586-linux]
MatchData
NotImplementedError
FloatDomainError
LoadError
Float
Binding
SignalException
Module
-:6:in `method_missing': stack level too deep (SystemStackError)
: %q(...)
%... -
NEWS for Ruby 2
. 1 . 0 (42.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* 追加: Array#to_h キーと値のペアの配列をハッシュに変換します。
* Binding
* 追加: Binding#local_variable_get
* 追加: Binding#local_variable_set
* 追加: Binding#local_variable_defined?
* Enumerable
* 追加: Enumerable#to_h キーと値のペア......した
* Kernel
* 追加: Kernel#singleton_method(Object#singleton_method)
* Module
* 追加: Module#using, which activates refinements of the specified module only
in the current class or module definition.
* 追加: Module#singleton_class? レシーバーが特異クラス......ます
* toplevel
* main.using はもはや実験的な機能ではありません。
The method activates refinements in the ancestors of the argument module to
support refinement inheritance by Module#include
=== 組み込みクラスの互換性 (機能追加とバグ修正を... -
NEWS for Ruby 2
. 2 . 0 (36.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...クセスできないという長年のバグを修正しました。 9593
=== 組み込みクラスの更新
* Binding
* 追加: Binding#local_variables
* 追加: Binding#receiver
* Dir
* 追加: Dir#fileno
* Enumerable
* 追加: Enumerable#slice_after
* 追加: Enumer......りました。
* ArgumentError is no longer raised when lambda Proc is passed as a
block, and the number of yielded arguments does not match the formal
arguments of the lambda, if just an array is yielded and its length
matches.
* Process
* Process.spawn のようなプ......e_error" というキーワード引数を受け付けるようになりました
* Matrix
* 追加: Matrix#first_minor
* 追加: Matrix#cofactor
* 追加: Matrix#adjugate
* 追加: Matrix#hstack, Matrix#vstack
* 追加: Matrix#laplace_expansion
* 追加: Vector.basis... -
NEWS for Ruby 2
. 6 . 0 (36.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...した。 13784
* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。
従来でも eval("[__FILE__, __LINE__]", binding) とすることでこ......れらの情報は得られましたが、
将来的に Kernel.#eval は binding のソースコード行を無視する変更を予定しているため 4352、
この新しいメソッドを用いることが今後は推奨されます。
* Dir
* 新規メソッド......byVM::AbstractSyntaxTree.parse_file はファイルをパースして AST ノードを返します。 [実験的]
* RubyVM::AbstractSyntaxTree.of は proc やメソッドに対応する AST ノードを返します。 [実験的]
* RubyVM
* 新規メソッド
* RubyVM.resolve_feat... -
NEWS for Ruby 2
. 5 . 0 (30.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...とエラーメッセージを逆順で表示するようにしました 8661 [実験的]
* binding.irb を実行したときに自動的に irb を読み込みます 13099 [実験的]
* binding.irb を実行したときに周囲のソースコードを表示します 14124
* matrix
*......* Preserve time zone offset when deserializing times
https://github.com/ruby/psych/pull/316
* Remove deprecated method aliases for syck gem
https://github.com/ruby/psych/pull/312
* rbconfig
* RbConfig::LIMITS is added to provide the limits of C types.
This is......available when rbconfig/sizeof is loaded.
* ripper
* Ripper::EXPR_BEG and so on for Ripper#state.
* Ripper#state を追加。スキャナーの状態を伝えるためです。13686
* rdoc
* RDoc 6.0.1 に更新
* Replace IRB based lexer with Ripper.
* https://github.... -
NEWS for Ruby 2
. 4 . 0 (24.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...数のオブジェクトを IPAddr に変換する処理に失敗しても例外が発生しなくなりました
12799
* irb
* Binding#irb binding.pryと同じようにREPLのセッションを開始します。r56624.
* logger
* Logger.new のキーワード引数に level, pro......0.class # => Integer
Fixnum # => Integer
Bignum # => Integer
# 以下の2つは同じ
obj.kind_of?(Fixnum)
obj.kind_of?(Integer)
/* Cレベルでは以下の2つを使ってFixnumとBignumを区別すべき */
FIXNUM_P(obj)
RB_... -
NEWS for Ruby 2
. 7 . 0 (24.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...れます。
_1 = 0 #=> warning: `_1' is reserved for numbered parameter; consider another name
[1].each { p _1 } # prints 0 instead of 1
==== ブロックなしの proc/lambda が deprecated
* ブロック付きで呼び出されたメソッドの中で、ブロックなしでPr......警告を止める例:
//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で両方止めるにはスペース区切りで指定します:
//emlist{
$ RUBYOPT='......ました。
* ERB
* ERBのインスタンスをMarshalできないようになりました。
* IRB
* Pry gem に着想を得て、Binding#irbのソース表示、REPLの入力、
いくつかのコアクラスオブジェクトのinspect出力に
シンタックスハイ...