るりまサーチ

最速Rubyリファレンスマニュアル検索!
64件ヒット [1-64件を表示] (0.090秒)

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. _builtin i
  5. _builtin $-i

検索結果

RubyVM::InstructionSequence.of(body) -> RubyVM::InstructionSequence (21243.0)

引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。

...:InstructionSequence オブジェクトを作成して返します。

@param body Proc、Method オブジェクトを指定します。

例1:irb で実行した場合

# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_bin...
...ding@(irb)>

# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/iseq_of.rb
def hello
puts "hello, world"
end

$a_global_...
...' + 'b' }

# irb
> require '/tmp/iseq_of.rb'

# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>

# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x0...

ruby 1.6 feature (1110.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) ->...
...ring#[]やString#slice と同じ結果を返すと
いうことです)

p "foo".slice!("bar") # <- 以前からこちらは nil を返していた
p "foo".slice!(5,10)

=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
-:2:in `slice!': index 5 out of strin...
...Exception
Numeric
MatchData
Segmentation fault

=> ruby 1.6.5 (2001-10-15) [i586-linux]
MatchData
NotImplementedError
FloatDomainError
LoadError
Float
Binding

SignalException...

1.6.8から1.8.0への変更点(まとめ) (600.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への変更点(まとめ)/サポートプラットフォームの追加>))

...の変更点(まとめ)/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: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-linux]
=> ruby 1.8.0 (2003-06-21) [i586-linux]
[1, 2, nil]

Proc.n...
...ect#object_id|Object/object_id>)) [new]

追加 (Object#id は、obsolete)

: ((<Object#singleton_method_removed|Object/singleton_method_removed>)) [new]
: ((<Object#singleton_method_undefined|Object/singleton_method_undefined>)) [new]

追加

=== Proc

: ((<Proc#binding|Proc/binding>)) [new]...

ruby 1.8.4 feature (228.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影...
...647 です。
# -e:1:in `printf': width too big (ArgumentError)

: Hash [bug]

#Wed Nov 23 03:40:49 2005 Guy Decoux <ts@moulon.inra.fr>
#
# * re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
# [ruby-core:06721]

sizeof(long) > sizeof(int) な環境で、ハッシ...
...uzou <gotoyuzo@notwork.org>
#
# * lib/drb/ssl.rb (DRb::SSLConfig#accept): fixed typo.
# [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]
#
# メソッ...

NEWS for Ruby 3.0.0 (210.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting...
...single rest argument and no keywords.
16166

//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leadin...
...ake_while
* Array#uniq
* Array#*
* Can be sliced with Enumerator::ArithmeticSequence

//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval...

絞り込み条件を変える

NEWS for Ruby 2.1.0 (72.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.0.0 以降の変更

=== 言語仕様の変更

* キーワード引数のデフォルト値が省略可...
...3.14ri # => Complex(0, 3.14r)
//}

* def によるメソッド定義式は nil の代わりにメソッド名をシンボルで返します

=== 組み込みクラスの更新

* Array
* 追加: Array#to_h キーと値のペアの配列をハッシュに変換します。

* Binding
*...
...張: IO#write_nonblock シンボルを返すためにキーワード引数 `exception: false` を受け付けるようになりました

* Kernel
* 追加: Kernel#singleton_method(Object#singleton_method)

* Module
* 追加: Module#using, which activates refinements of the specified mod...

NEWS for Ruby 2.7.0 (30.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ルか bugs.ruby-lang.org の issue を参照してください。

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

* パターンマッチが実験的機能として導入されました。 14912

//emlist[][ruby]{
case [0, [1, 2, 3]]
i
n [a, [b, *c]]
p a #=> 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

* ブロック付きで呼び出さ...
...うになりました。

* IRB
* Pry gem に着想を得て、Binding#irbのソース表示、REPLの入力、
いくつかのコアクラスオブジェクトのinspect出力に
シンタックスハイライトが導入されました。
* Relineによって提供される...