るりまサーチ

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

別のキーワード

  1. _builtin to_proc
  2. _builtin proc
  3. proc curry
  4. httpserver mount_proc
  5. readline completion_proc

検索結果

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

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

... Proc、Method オブジェクトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。

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

例1:irb で実行した場合

# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)...
...uctionSequence:block in irb_binding@(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 "he...
...$a_global_proc = proc { 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)
> # =>...

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

...らしい
^^;;)

: ((<Proc/Proc.new>)) [change]
: ((<組み込み関数/lambda>)) [change]
: ((<組み込み関数/proc>)) [change]

以下のように変更されました。((<ruby-dev:20358>))

* Proc.new およびブロック引数で与えられる Proc
引数チェ...
...ックがゆるい。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-12-24) [i586-lin...
...=== Proc

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

追加

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

追加

# : ((<Precision>)).included [new]
#
# 追加(((<Module#included|Module>)) の再定義)

=== Process

: ((<Process/Process.initgroups>)) [new]
追加

: ((<Process/Process.gr...

NEWS for Ruby 3.0.0 (246.0)

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

...ror 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 a single rest argument and no keywords.
16166

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

pr.call([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...

NEWS for Ruby 2.7.0 (96.0)

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

...0 instead of 1

==== ブロックなしの proc/lambda が deprecated

* ブロック付きで呼び出されたメソッドの中で、ブロックなしでProc.newやKernel#proc
呼び出すと警告が表示されるようになりました。

//emlist[][ruby]{
def foo
proc

end
foo {...
...puts "Hello" } #=> warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead
//}

* 非推奨に関する警告を止めたい場合は、コマンドライン引数に
「-W:no-deprecated」を指定するか、コードの中で
「Warning[:deprecated] = f...
...ました。

* ERB
* ERBのインスタンスをMarshalできないようになりました。

* IRB
* Pry gem に着想を得て、Binding#irbのソース表示、REPLの入力、
いくつかのコアクラスオブジェクトのinspect出力に
シンタックスハイ...

ruby 1.6 feature (90.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...
...d>))

サイズが 0 で中身のあるファイル(Linux の /proc ファイルシステムでこ
のような場合があります)が File#read などで読めないバグが修正されまし
た。

p File.open("/proc/#$$/cmdline").read

=> ruby 1.6.7 (2002-03-01) [i586-li...
...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.6.0 (78.0)

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

...した。 13784

* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。
従来でも eval("[__FILE__, __LINE__]", binding) とすることでこ...
...しいキーと値に変換できるようになりました。 15143

* Proc
* 新規メソッド
* 関数合成用に Proc#<< と Proc#>> が追加されました。 6284
* 非互換な変更
* Proc#call が $SAFE を変更しなくなりました。 14250

* Random
*...
...::AbstractSyntaxTree.parse_file はファイルをパースして AST ノードを返します。 [実験的]
* RubyVM::AbstractSyntaxTree.of proc やメソッドに対応する AST ノードを返します。 [実験的]

* RubyVM
* 新規メソッド
* RubyVM.resolve_feature_...

NEWS for Ruby 2.1.0 (66.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? レシーバーが特異クラス...
...とができます。

* Process
* 追加: Process.#argv0 オリジナルの $0 の値を返します。
* 追加: Process.#setproctitle $0 に影響を与えずにプロセス名をセットできます。
* 追加: Process.#clock_gettime
* 追加: Process.#clock_getres

* Strin...

NEWS for Ruby 2.2.0 (60.0)

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

...クセスできないという長年のバグを修正しました。 9593

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

* Binding
* 追加: Binding#local_variables
* 追加: Binding#receiver

* Dir
* 追加: Dir#fileno

* Enumerable
* 追加: Enumerable#slice_after
* 追加: Enumer...
...entError ではなく
ArgumentError のサブクラスである UncaughtThrowError を発生させるようになりました


* Process
* 拡張: Process.spawn のような外部プロセスを起動するメソッドは [:out, :err] からリダイレクト
されたファイル...
...な値を返します。

* Proc
* 非互換: ArgumentError は発生しなくなりました。
* 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...

NEWS for Ruby 2.5.0 (48.0)

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

...ようにしました 14123
* Kernel.#warn :uplevel というキーワード引数を追加しました 12882

* Method
* Method#=== は Proc#===と同じようにMethod#callを呼び出します 14142

* Module
* Module#attr, Module#attr_accessor, Module#attr_reader, Module#attr_w...
...とエラーメッセージを逆順で表示するようにしました 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...

NEWS for Ruby 2.4.0 (42.0)

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

...

== 2.3.0 以降の変更

=== 言語仕様の変更

* 条件式での多重代入ができるようになりました 10617
* Symbol#to_proc でメソッド呼び出し元での Refinements が有効になりました 9451
* Object#send や BasicObject#__send__ でメソッドを呼び...
...数のオブジェクトを 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_...

絞り込み条件を変える