37件ヒット
[1-37件を表示]
(0.031秒)
種類
- 文書 (26)
- インスタンスメソッド (11)
ライブラリ
- ビルトイン (11)
クラス
- BasicObject (11)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
先頭4件
-
NEWS for Ruby 3
. 0 . 0 (26072.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern mat......`false`. 17371
//emlist{
0 => a
p a #=> 0
{b: 0, c: 1} => {b:}
p b #=> 0
//}
//emlist{
# version 3.0
0 in 1 #=> false
# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}
* Find-pattern is added. [EXPERIMENTAL]
16828
//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre,... -
ruby 1
. 6 feature (23312.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...00019>))
: 2002-09-11: Queue#((<Queue/pop>))
Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))
: 2002-09-11: SizedQueue.new
引数に 0 以下を受けつけるバグが修正されました。
: 2002-09-05: ((<リテラル/式展開>))
stable snapshot で、一......=> ruby 1.6.5 (2001-11-01) [i586-linux]
"**+"
"+"
"\001\000"
"+\000"
"*+\000"
: method_missing
以下が Segmentation Fault していました。((<ruby-dev:14942>))
Module.constants.each {|c|
c = eval c......(rb_safe_level() >= 4 && !OBJ_TAINTED(klass)) {
+ if (rb_safe_level() >= 4 && (klass == rb_cObject || !OBJ_TAINTED(klass))) {
rb_raise(rb_eSecurityError, "Insecure: can't define method");
}
if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");
また今度... -
ruby 1
. 8 . 4 feature (23180.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on......pected '(', expecting $end
#Tue Nov 1 14:20:11 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (rb_call_super): should call method_missing if super is
# called from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# inform......* test/openssl/test_x509ext.rb: new file.
#
# ?
#Tue Nov 01 10:50:17 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
#
# * ext/openssl/extconf.rb: should check ERR_peek_last_error().
# [ruby-dev:27597]
#
# * ext/openssl/ossl.c (ossl_raise): ditto.
#
# ?
#Mon Oct 31 05:49:... -
BasicObject
# method _ missing(name , *args) -> object (18125.0) -
呼びだされたメソッドが定義されていなかった時、Rubyインタプリタがこのメソッド を呼び出します。
...数です。
@return ユーザー定義の method_missing メソッドの返り値が未定義メソッドの返り値で
あるかのように見えます。
//emlist[例][ruby]{
class Foo
def initialize(data)
@data = data
end
def method_missing(name, lang)
if name.to_s =~ /\Afind_......(\d+)_in\z/
if @data[lang]
p @data[lang][$1.to_i]
else
raise "#{lang} unknown"
end
else
super
end
end
end
dic = Foo.new({:English => %w(zero one two), :Esperanto => %w(nulo unu du)})
dic.find_2_in :Esperanto #=> "du"
//}
[注意] このメソッド...