るりまサーチ

最速Rubyリファレンスマニュアル検索!
218件ヒット [1-100件を表示] (0.022秒)
トップページ > クエリ:Module[x] > 種類:文書[x]

別のキーワード

  1. module attr
  2. module new
  3. erb def_module
  4. module constants
  5. module module_eval

検索結果

<< 1 2 3 > >>

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

...いう振
るまい(C の do ... while 構文と同じ)をしていませんでした。
((<ruby-list:34618>))

: ((<"rescue/ensure on class/module"|クラス/メソッドの定義/クラス定義>)) [compat]

メソッド定義のほかにもクラス定義やモジュール定義にもresc...
...クラスと発生した例外オブジェクトの比較 [ruby] [change]

発生した例外 $! と rescue 節の例外クラスとは ((<Module#===|Module/===>))
を使って比較するようになりました。

以前は kind_of? による比較なので基本的な動作に変わりは...
...えるかもしれません)
((<ruby-dev:19589>))

: while, until, class, module, def の値 [ruby] [change]

while, until, class, module, def が式として値を返すようになりました。

class/module は最後に評価した式の結果を返します。def は nil を返...

ruby 1.6 feature (133.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...01) [i586-linux]
""

=> ruby 1.6.7 (2002-03-29) [i586-linux]
"ruby-1.6\000-v\000-"

: 2002-03-22 ((<Module/module_eval>))

((<Module/module_eval>)) のブロック内で定数やクラス変数のスコープが
変わることはなくなりました。((<ruby-dev:...
...rubyist:1018>)), ((<ruby-dev:15684>)),
((<ruby-dev:15757>))

: ((<Module/include>))

モジュールが再帰的に include されないようになりました。

module
Foo; end
module
Bar; include Foo; end
module
Foo; include Bar; end

p Foo.ancestors

=> ruby 1.6.6 (2001...
...て IOError を起こすようになった。

* IO#each_byte が self を返すようになった(以前は nil)

: rb_define_module_under()

C 関数 rb_define_module_under() でモジュールを定義するときに同名の定
数が既に定義されていると失敗していました...

クラス/メソッドの定義 (119.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...
...うな場合は外側は普通モジュールが利用される
# (Net のインスタンスがない。Net を include できるなどのため)
module
Net
class HTTP
end
class FTP
end
end

obj = Net::HTTP.new

# あるいは

include Net
obj = HTTP.new

# 以下のような使い方は組...
...者は File::Constants を include することで、
# File::RDONLY などと書かずに直接 RDONLY と書くことができる。
class File
module
Constants
RDONLY = 0
WRONLY = 1
end
include Constants
end

File.open("foo", File::RDONLY)

# あるいは

include File::Constants
Fi...

NEWS for Ruby 3.0.0 (97.0)

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

...is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a RuntimeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the t...
...* Module
* Module#include and Module#prepend now affect classes and modules that have already included or prepended the receiver, mirroring the behavior if the arguments were included in the receiver before the other modules and classes included or prepended the receiver. 9573
* Module#pu...
...blic, Module#protected, Module#private, Module#public_class_method, Module#private_class_method, toplevel "private" and "public" methods now accept single array argument with a list of method names. 17314
* Module#attr_accessor, Module#attr_reader, Module#attr_writer and Module#attr methods now...

NEWS for Ruby 2.1.0 (91.0)

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

...l
* 追加: 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? レシーバーが特異クラスであれば true...
...バーが通常のクラスやモジュールであれば false を返します。
* 拡張: Module#refine はもはや実験的な機能でなくなりました
* 拡張: Module#include と Module#prepend はパブリックメソッドになりました

* Mutex
* Mutex#owned? はも...
...はや実験的な機能ではありません。
The method activates refinements in the ancestors of the argument module to
support refinement inheritance by Module#include

=== 組み込みクラスの互換性 (機能追加とバグ修正を除く)

* Hash
* 非互換: Hash#rejec...

絞り込み条件を変える

Ruby用語集 (85.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 スクリ...
...参照:rdoc

: refinement
既存のクラスやモジュールを特定のスコープでのみ改変する仕組み。

参照:Module#refine、Module#using、main.using

: Ruby Central
Rubyのサポートと世界の Ruby コミュニティーの支援を専門とする非営利組織...
...ルが利用する、二つのオブジェクトの順序関係を表す
演算子 <=> の俗称。

: 埋め込みドキュメント
: embedded document
ソースコード中の =begin 行から =end 行まで。コメントとみなされ実行されない。

その名の通り、この部...

Marshal フォーマット (61.0)

Marshal フォーマット フォーマットバージョン 4.8 を元に記述しています。

....new).unpack("x2 a ac a11 c aca3a aca3a")
# => ["S", ":", 16, "Struct::XXX", 7,
# ":", 8, "foo", "0",
# ":", 8, "bar", "0"]
//}

=== Class/Module (old format)

'M' で始まるデータ構造です。

//emlist{
| 'M' | 長さ(Fixnum形式) | モジュール/クラス名 |
//}

今ではこ...
...示しています。

//emlist[例][ruby]{
class Mod
end
p Marshal.load([4,7, 'M', 3+5, 'Mod'].pack("ccaca*"))
# => Mod
//}

===[a:class_module] Class/Module

'c', 'm' で始まるデータ構造です。

//emlist{
| 'c'/'m' | クラス名の長さ(Fixnum 形式) | クラス名 |
//}

//emlist[例...
...ス変数は dump されない][ruby]{
module
Bar
@bar = 1
end
p Bar.instance_eval { @bar } # => 1
File.open('testfile', 'wb') do |f|
Marshal.dump(Bar, f)
end

# 別プログラム相当にするため remove_const
Object.send :remove_const, :Bar

module
Bar
end

p bar = Marshal.load(File.binrea...

NEWS for Ruby 2.0.0 (55.0)

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

...* Module
* 追加: Module#prepend 指定したモジュールを self の継承チェインの先頭に
「追加する」ことで self の定数、メソッド、モジュール変数を「上書き」します。
* 追加: Module.prepended, Module.prepend_features は Module.inc...
...luded と Module.append_features に似ています
* 追加(実験的): Module#refine, スコープを限定してクラスやモジュールを拡張します。
* 拡張: Module#define_method は UnboundMethod を受け付けるようになりました
* 拡張: Module#const_get 修...
...olv
* 追加: Resolv::DNS#timeouts=
* 追加: Resolv::DNS::Config#timeouts=

* rexml
* REXML::Document#write はハッシュ引数をサポートしました
* REXML::Document#write は :encoding オプションをサポートしました。
XMLドキュメントのエンコ...

NEWS for Ruby 2.5.0 (55.0)

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

...thod#callを呼び出します 14142

* Module
* Module#attr, Module#attr_accessor, Module#attr_reader, Module#attr_writer はパブリックメソッドになりました 14132
* Module#define_method, Module#alias_method, Module#undef_method, Module#remove_method はパブリックメソ...
...his much improves the speed of generating documents.
* It also facilitates supporting new syntax in the future.
* Support many new syntaxes of Ruby from the past few years.
* Use "frozen_string_literal: true".
This reduces document generation time by 5%.
* Support d...

NEWS for Ruby 2.7.0 (55.0)

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

...告は Ruby 3.0 では verbose モードでなくても表示され、Ruby 3.2 で削除される
予定です。 16131

* Object#methodとModule#instance_methodがrefinementsを考慮するようになりました。 15373

=== コマンドラインオプション

==== 警告オプション...
...145

* Module
* 新規メソッド
* 定数が定義された場所を取得するModule#const_source_location
メソッドが追加されました。 10771
* 通常の引数分解でキーワード引数を渡すようにメソッドに印をつける
Module
#ruby2_...
...たメソッド
* Module#const_defined?のようにModule#autoload?が
inheritオプショナル引数を受け付けるようになりました。 15777
* Module#nameが常にfreezeされた文字列を返すようになりました。
同じModuleは常に同じString...

絞り込み条件を変える

Ruby プログラムの実行 (55.0)

Ruby プログラムの実行 === Ruby プログラム

...パイル時ではなく)実行時に行われます。

書式

module
ModuleName
本体
end

モジュール定義式は評価されるとまず新しい無名のモジュールを生成します。
ただしすでに ModuleName と名付けられたモジュールがある場合はそれ...
...。このような場合は「モジュール定義の追加」をすること
になります。

モジュールを得たら次にそれを定数 ModuleName に代入します。この定数が
モジュールの名前になります。このとき同名の定数にモジュール以外が代入...
...発生します。

最後に、新しいフレームを生成し、そのトップレベルブロックの self および
class にモジュール ModuleName を設定し、そのフレーム上で定義式中の式を
評価します。モジュール定義式は最後に評価した式の結果...
<< 1 2 3 > >>