別のキーワード
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- Ruby用語集 (11)
- クラス/メソッドの定義 (11)
検索結果
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (181.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への変更点(まとめ)/サポートプラットフォームの追加>))
...: ((<Module#public_method_defined?|Module/public_method_defined?>)) [new]
: ((<Object#methods|Object/methods>)) [change]
: ((<Module#instance_methods|Module/instance_methods>)) [change]
追加。変更(仕様の統一)
: ((<Module#include?|Module/include?>)) [new]
Added. ((<ruby-dev:13941>))......(<Object#instance_variable_get|Object/instance_variable_get>)) [new]
: ((<Object#instance_variable_set|Object/instance_variable_set>)) [new]
追加
: ((<Object#object_id|Object/object_id>)) [new]
追加 (Object#id は、obsolete)
: ((<Object#singleton_method_removed|Object/singleton_method_r......emoved>)) [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#included|Module... -
クラス/メソッドの定義 (57.0)
-
クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined
...クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* d......式は、最後に評価した式の結果を返します。最後に評価した式
が値を返さない場合は nil を返します。
===[a:singleton_class] 特異クラス定義
//emlist[例][ruby]{
obj = Object.new # obj = nil でも可
class << obj
def test
# ...
end
# ...
end
//......# <- foo は未定義
def foo
print "foo\n"
end
//}
は未定義メソッドの呼び出しで例外 NameError を発生させます。
===[a:singleton_method] 特異メソッド定義
//emlist[例][ruby]{
def foo.test
print "this is foo\n"
end
//}
文法:
def 式 `.' 識別子 [`... -
Ruby用語集 (55.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...し、切り替えて使うための
ツールの一つ。Linux、macOS などで動作する。
https://github.com/rbenv/rbenv
: RD(Ruby Document format)
Ruby スクリプト中に記述することを念頭に作られたドキュメントフォーマット。
: RDoc
Ruby スクリ......分類される。
: インスタンス
: instance
あるクラスに属すオブジェクトをそのクラスのインスタンスという。
あるオブジェクトがあるクラスのインスタンスであるかどうかは Object#instance_of? で
確認できる。
なお、あ......一性
: 特異クラス
: singleton class
すべてのオブジェクトには自身が属すクラスとは別に、オブジェクト固有の
クラスがあり、特異クラスと呼ばれる。
参照:Object#singleton_class
: 特異メソッド
: singleton method
オブジェク... -
NEWS for Ruby 2
. 1 . 0 (43.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...した
* 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? レシーバーが特異クラス......: IO.open は外部エンコーディングが ASCII-8BIT のとき内部エンコーディングを無視します。
* Kernel.#eval, Kernel.#instance_eval, Module#module_eval
元の環境のスコープ情報をコピーするようになりました。これは、引数なしの
privat......* 特異クラスの祖先はそれ自身を含みます。
The ancestors of a singleton class now include singleton classes,
in particular itself.
* Module#define_method Object#define_singleton_method
* 定義したメソッドの名前をシンボルで返すようになり... -
NEWS for Ruby 3
. 0 . 0 (31.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...E` are now normal global variables with no special behavior.
C-API methods related to `$SAFE` have been removed.
16131 17136
* yield in singleton class definitions in methods is now a SyntaxError
instead of a warning. yield in a class definition outside of a method
is now a SyntaxE......ace.
8661
== Core classes updates
Outstanding ones only.
* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slic......ages and avoids blocking when using a scheduler. 16792
* Proc
* Proc#== and Proc#eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke... -
NEWS for Ruby 2
. 0 . 0 (25.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...与えられた名前がスレッドローカルな変数であるかどうか返します
* 追加: Thread.handle_interrupt as well as instance and singleton methods
Thread.pending_interrupt? for asynchronous handling of exceptions
* 追加: Thread#backtrace_locations Kernel#caller_lo......now requested for all requests by
default. See Net::HTTP for details.
* SSL sessions are now reused across connections for a single instance.
This speeds up connection by using a previously negotiated session.
* Requests may be created from a URI which sets the request_u......olv
* 追加: Resolv::DNS#timeouts=
* 追加: Resolv::DNS::Config#timeouts=
* rexml
* REXML::Document#write はハッシュ引数をサポートしました
* REXML::Document#write は :encoding オプションをサポートしました。
XMLドキュメントのエンコ... -
NEWS for Ruby 2
. 7 . 0 (25.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...Ruby 3.0 では verbose モードでなくても表示され、Ruby 3.2 で削除される
予定です。 16131
* Object#methodとModule#instance_methodがrefinementsを考慮するようになりました。 15373
=== コマンドラインオプション
==== 警告オプション
カ......+ 1
end
end
class Bar < Foo
def add_1(x) # override
x + 2
end
end
obj = Bar.new
p obj.add_1(1) #=> 3
p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2
p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2
//}
* Warning
* 新規メソッド
* Warning.[] とWarning.[]=が......i
* delegate
* getoptlong
* net-pop
* net-smtp
* open3
* pstore
* readline
* readline-ext
* singleton
* 以下のdefault gemはruby-coreでの変更のみで、まだrubygems.orgでは公開されていません。
* monitor
* obs... -
Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (13.0)
-
Rubyで使われる記号の意味(正規表現の複雑な記号は除く) ex q num per and or plus minus ast slash hat sq period comma langl rangl eq tilde dollar at under lbrarbra lbra2rbra2 lbra3rbra3 dq colon ac backslash semicolon
...er
クラス定義でスーパークラスを指定しています。
d:spec/def#class。
: class << obj
特異クラス定義。d:spec/def#singleton_classを参照。
===[a:rangl] >
: 3 > 5
「より大きい」比較演算子
: 3 >= 5
「より大きいか等しい」比較演算子......ッチします。改行自身は含みません。
spec/regexpを参照。
===[a:at] @
: @xxx
インスタンス変数。d:spec/variables#instanceを参照。
: @@xxx
クラス変数。d:spec/variables#classを参照。
: def +@ または def -@
単項演算子 +X や -X を定義する...