るりまサーチ

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

別のキーワード

  1. module attr
  2. module new
  3. module module_eval
  4. module class_eval
  5. module constants

種類

検索結果

debug (38006.0)

Ruby デバッガです。Ruby スクリプトのソースコードデバッグに使用します。

...したインタフェース rubydb3x.el が
https://github.com/ruby/elisp にあるので、活用してください。

=== 使い方

$ ruby -rdebug foo.rb

または、Emacs から

M-x load-library rubydb3x.el
M-x rubydb

=== デバッグコマンド

以下は、デバッガで使用...
...変数、<object>の定数を表示します。

このコマンドの省略形は v です。

: method i[nstance] <object>
: method <class|module>
それぞれ、オブジェクト<object>のインスタンスメソッド
クラスメソッド または モジュールメソッドを...

NEWS for Ruby 3.0.0 (102.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...
...ault gems
* The following libraries are promoted to default gems from stdlib.
* English
* abbrev
* base64
* drb
* debug
* erb
* find
* net-ftp
* net-http
* net-imap
* net-protocol
* open-uri
* optparse
* pp...

NEWS for Ruby 3.1.0 (90.0)

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

...protected?, UnboundMethod#public?, UnboundMethod#private?, UnboundMethod#protected? が追加されました。 11689

* Module
* 変更されたメソッド
* Module#prepend はレシーバが既に引数をincludeしている場合、継承ツリーを変更するようになりまし...
...レシーバが既に引数をprependしている場合、継承ツリーを変更しません。 17423
* Module#private, Module#public, Module#protected, Module#module_functionが引数を返すようになりました。引数が1つでも渡されている場合、それが返されます...
...更されました。
* net-ftp 0.1.3
* net-imap 0.2.2
* net-pop 0.1.1
* net-smtp 0.3.1
* matrix 0.4.2
* prime 0.1.2
* debug 1.4.0
* 以下が標準添付ライブラリから削除されました。
* dbm
* gdbm
* tracer

* Coverageの計測が一時停...

NEWS for Ruby 2.3.0 (36.0)

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

...g-literal というコマンドラインオプションも導入されました
8976
* コマンドラインオプションに --debug または --debug=frozen-string-literal を付けて実行すると、
freeze された文字列を操作しようとして RuntimeError が発生し...
...* Kernel.#loop は StopIteration で停止したときに nil ではなく最後に評価した要素を返します。
11498

* Module
* Module#deprecate_constant を追加
11398

* NameError
* レシーバーオブジェクトを返す NameError#receiver を追加...
...each_codepoint は、変換時、EOFの前に不完全な文字があると例外が発生するようになりました。
11444

* Module
* Module#define_method と Object#define_singleton_method は
メソッド本体(Procオブジェクト、Methodオブジェクト、または...

rdoc (24.0)

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。

...no-dcov

ドキュメントが記述されていない要素に関するレポートを出力しません。

: --debug

実行時に内部情報を出力します。

: --no-debug

実行時に内部情報を出力しません。

: --diagram

何もしません。--diagram オプション...
...メントに 含まれます。これをオフにしたい場合は all 修飾
子を加えます。

//emlist{
module
SM #:nodoc:
class Input
end
end
module
Markup #:nodoc: all
class Output
end
end
//}

以上のコードでは、SM::Input のドキュ...

絞り込み条件を変える

制御構造 (18.0)

制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END

...

//emlist[][ruby]{
$_ =~ リテラル
//}

であるかのように評価されます。

==== if 修飾子

//emlist[例][ruby]{
print "debug\n" if $DEBUG
//}

文法:

式 if 式

右辺の条件が成立する時に、左辺の式を評価してその結果を返します。
条件...
...文が存在しなかったときの値
はnilです。いずれにしてもensure節の値は無視されます。

d:spec/def#class、d:spec/def#module、d:spec/def#method
などの定義文では、それぞれ
begin なしで rescue, ensure 節を定義でき、これにより例外を処理す...