種類
- 文書 (53)
- ライブラリ (22)
- 特異メソッド (22)
- インスタンスメソッド (11)
ライブラリ
- ビルトイン (22)
-
irb
/ extend-command (11)
クラス
- Thread (11)
- TracePoint (11)
モジュール
キーワード
-
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
- backtrace (11)
-
def
_ extend _ command (11) -
irb
/ completion (11) - new (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
先頭5件
-
irb (65706.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def foo
irb(main):004:2> print 1
irb(main):005:2> end
irb(main):006:1>......end
:foo
irb(main):007:0>
また irb コマンドは readline ライブラリにも対応しています。
readline ライブラリがインストールされている時には
自動的にコマンドライン編集や履歴の機能が使えるようになります。
=== irb のコマン... -
irb
/ completion (32082.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Objec......lic_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class foo.instance_of? foo.taint
foo.clone foo.i... -
IRB
:: ExtendCommandBundle . def _ extend _ command(cmd _ name , cmd _ class , load _ file = nil , *aliases) -> object (6359.0) -
irb に cmd_name で指定したメソッドが実行できるように拡張します。
...
irb に cmd_name で指定したメソッドが実行できるように拡張します。
@param cmd_name メソッド名を Symbol か文字列で指定します。
cmd_class で指定するクラスの execute メソッドとして定
義してある必要があ......param cmd_class 指定した拡張が定義されたクラス名を Symbol、
String、Class のいずれかで指定します。
なお、このクラスは IRB::ExtendCommand 以下で定義
する必要があります。
@param load_file 指定......に require されます。
@param aliases cmd_name の別名を Symbol とフラグの配列で指定しま
す。複数指定する事ができます。フラグは
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONL... -
TracePoint
. new(*events) {|obj| . . . } -> TracePoint (3124.0) -
新しい TracePoint オブジェクトを作成して返します。トレースを有効 にするには TracePoint#enable を実行してください。
...しい TracePoint オブジェクトを作成して返します。トレースを有効
にするには TracePoint#enable を実行してください。
//emlist[例:irb で実行した場合][ruby]{
trace = TracePoint.new(:call) do |tp|
p [tp.lineno, tp.defined_class, tp.method_id, tp.event]
e......nd
# => #<TracePoint:0x007f17372cdb20>
trace.enable
# => false
puts "Hello, TracePoint!"
# ...
# [69, IRB::Notifier::AbstractNotifier, :printf, :call]
# ...
//}
トレースを無効にするには TracePoint#disable を実行してください。
//emlist[][ruby]{
trace.disable
//}
@param even......ts トレースするイベントを String か Symbol で任
意の数指定します。
: :line
式の評価。
: :class
クラス定義、特異クラス定義、モジュール定義への突入。
: :end
クラス定義、特異クラス定義、モジュール定義... -
ruby 1
. 6 feature (1314.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) ->......by 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:17876>))
class Foo
FOO = 1......にあります)
: ((<irb>)) & irb-tools
irb と irb-tools がそれぞれ 0.7.4 と 0.7.1 にバージョンアップしました。
: 夏時間
夏時間の考慮に不備がありました(?) ((<ruby-bugs-ja:PR#46>))
env TZ=America/Managua ruby -e 'p Time.local(1998,12,1,0,59,59)... -
ruby 1
. 8 . 4 feature (198.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影......e/Iconv>))
* ((<ruby 1.8.4 feature/WEBrick::Config::FileHandler [compat]>))
* ((<ruby 1.8.4 feature/WEBrick>))
* ((<ruby 1.8.4 feature/WEBrick::HTTPRequest#query_string= [new]>))
* ((<ruby 1.8.4 feature/Readline [bug]>))
* ((<ruby 1.8.4 feature/Syck [bug]>))
* ((<ruby 1.8.4 feature/irb [......r): should call method_missing if super is
# called from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# information.
: super [bug]
Kernelのメソッド内でsuperを呼んだ時に、存在しないsuperclass
にアクセスし... -
Ruby用語集 (154.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...Ruby用語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-ba......==[a:I] I
: irb
組込みの対話型 Ruby 実行環境およびそのコマンド名。
irb コマンドで起動し、Ruby の式を入力すればその場で評価して結果を表示する。
名称は interactive Ruby から。
参照:irb
: is-a 関係
Ruby では Object#is_a?......ーションソフト組込みに適した特徴を持つ。
https://mruby.org/
: main
トップレベルにおける self。Object クラスのインスタンスである。
===[a:N] N
: nil
NilClass の唯一のインスタンス。また、そのオブジェクトを指す擬似変数... -
Thread
# backtrace -> [String] | nil (136.0) -
スレッドの現在のバックトレースを返します。
...nil を返します。
//emlist[例][ruby]{
class C1
def m1
sleep 5
end
def m2
m1
end
end
th = Thread.new {C1.new.m2; Thread.stop}
th.backtrace
# => [
# [0] "(irb):3:in `sleep'",
# [1] "(irb):3:in `m1'",
# [2] "(irb):6:in `m2'",
# [3] "(irb):10:in `block in irb_......binding'"
# ]
th.kill
th.backtrace # => nil
//}... -
NEWS for Ruby 3
. 0 . 0 (108.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError 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......since Ruby 2.7.2).
Turn them on with `-W:deprecated` (or with `-w` to show other warnings too).
16345
* `$SAFE` and `$KCODE` are now normal global variables with no special behavior.
C-API methods related to `$SAFE` have been removed.
16131 17136
* yield in singleton class defini......to Date 3.1.1
* This version is Ractor compatible.
* Digest
* Update to Digest 3.0.0
* This version is Ractor compatible.
* Etc
* Update to Etc 1.2.0
* This version is Ractor compatible.
* Fiddle
* Update to Fiddle 1.0.5
* IRB
* Update to IRB 1.2.6
* JSON
*... -
ruby 1
. 8 . 2 feature (78.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響......net/imap [lib] [new]
added new option --ssl
=== 2004-06-16
: object.c [ruby] [bug]
特異クラスが特異オブジェクトのクラスを継承していると見なされて
いるバグを修正しました。((<ruby-dev:23690>))
$ ruby1.8.1 -e 'class X;end; x=X.new; class << x......Alias が追加されました。
=== 2004-02-24
: OpenSSL::Config#each [lib] [new]
: Dir.glob [ruby] [change]
File::FNM_DOTMATCH がセットされない限り Dir.glob('test/**/') は 'test/.test/' などに
マッチしなくなりました。((<ruby-dev:23014>))
=== 2004-02-20
: irb [lib]...