るりまサーチ

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

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. class new
  5. argf.class gets

検索結果

<< 1 2 > >>

irb (39622.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 (6082.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...
...espond_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.instance_variables foo.tainted?
foo.display foo.is_a?...

IRB::ExtendCommandBundle.def_extend_command(cmd_name, cmd_class, load_file = nil, *aliases) -> object (3159.0)

irb に cmd_name で指定したメソッドが実行できるように拡張します。

...
irb
に cmd_name で指定したメソッドが実行できるように拡張します。

@param cmd_name メソッド名を Symbol か文字列で指定します。
cmd_class で指定するクラスの execute メソッドとして定
義してある必要があ...
...ります。

@param cmd_class 指定した拡張が定義されたクラス名を Symbol、
String、Class のいずれかで指定します。
なお、このクラスは IRB::ExtendCommand 以下で定義
する必要があります。

@param lo...
...しま
す。複数指定する事ができます。フラグは
IRB
::ExtendCommandBundle::NO_OVERRIDE、
IRB
::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY、
IRB
::ExtendCommandBundle::OVERRIDE_ALL のいずれか
を指定し...

ruby 1.6 feature (264.0)

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

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

class
Foo
FOO = 1
@@foo = 1
end

FOO = 2
@@foo = 2

Foo.module_eval { p FOO, @@foo }

=...
...列を返すようになった

: 2002-03-08 class variable

((<ruby-talk:35122>))

class
C
class
<< self
def test
@@cv = 5
p @@cv
end
end

test
end
=> -:5:in `test': uninitialized class variable @@cv in C (NameError)
fr...
...準ライブラリとして新規に追加されました。
(ドキュメントが doc ディレクトリにあります)

: ((<irb>)) & irb-tools

irb
irb-tools がそれぞれ 0.7.4 と 0.7.1 にバージョンアップしました。

: 夏時間

夏時間の考慮に不備があ...

Ruby用語集 (114.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...:rubygems

===[a:I] I

: irb
組込みの対話型 Ruby 実行環境およびそのコマンド名。

irb
コマンドで起動し、Ruby の式を入力すればその場で評価して結果を表示する。
名称は interactive Ruby から。

参照:irb

: is-a 関係
Ruby で...
...

https://mruby.org/

: main
トップレベルにおける self。Object クラスのインスタンスである。

===[a:N] N

: nil
NilClass の唯一のインスタンス。また、そのオブジェクトを指す擬似変数の名前。
論理値としては偽である。

Ruby...
...する。

オブジェクト空間に関する情報は ObjectSpace クラスで得ることが
できる。

: オープンクラス
: open class
組込みのクラスが再定義可能であること。
Ruby は String や Integer といった基本的なクラスも自由に改変でき...

絞り込み条件を変える

NEWS for Ruby 3.0.0 (102.0)

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

...d 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 SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a Run...
...timeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class
variable from the toplevel scope is now a RuntimeError.
14541
* Assigning to a numbered parameter is now a SyntaxError instead of
a warning.

== Command line options

==...
...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
* Update to JSON 2.5.0
* This version is Ractor compatible.
* Set
* Update to set 1.0.0
* SortedSet has...

NEWS for Ruby 3.1.0 (72.0)

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

...* Class
* 新規メソッド
* Class#subclassesはレシーバを継承した子クラスを要素に持つ配列(シングルトンクラスを含まない)を返します。

//emlist[Class#subclasses][ruby]{
class
A; end
class
B < A; end
class
C < B; end
class
D < A; end
A.subclasses...
...#=> [D, B]
B.subclasses #=> [C]
C.subclasses #=> []
//}

* Enumerable
* 新規メソッド
* Enumerable#compactが追加されました。 17312
* Enumerable#tallyがカウント集計用のハッシュオブジェクトを任意で渡せるようになりました。 1774...
...3.0
* fcntl 1.0.1
* fiddle 1.1.0
* fileutils 1.6.0
* find 0.1.1
* io-console 0.5.10
* io-wait 0.2.1
* ipaddr 1.2.3
* irb 1.4.1
* json 2.6.1
* logger 1.5.0
* net-http 0.2.0
* net-protocol 0.1.2
* nkf 0.1.1
* open-uri 0.2.0
* openssl 3.0.0...

ruby 1.8.4 feature (66.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...ck::HTTPRequest#query_string= [new]>))
* ((<ruby 1.8.4 feature/Readline [bug]>))
* ((<ruby 1.8.4 feature/Syck [bug]>))
* ((<ruby 1.8.4 feature/irb [bug]>))
* ((<ruby 1.8.4 feature/RDoc [bug]>))
* ((<ruby 1.8.4 feature/Win32API [bug]>))
* ((<ruby 1.8.4 feature/Rinda [bug]>))
* ((<ruby 1...
...g eval should preserve external
# information.

: super [bug]

Kernelのメソッド内でsuperを呼んだ時に、存在しないsuperclass
にアクセスしようとするバグの修正。

module Kernel
def foo
super
end
end...
...tring
: super: no superclass method `foo' (NoMethodError)
from -:7

: 正規表現 [bug]

#Wed Oct 19 01:27:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * regex.c (re_compile_pattern): numeric literal inside character class
# disabled succeeding back...

NEWS for Ruby 2.7.0 (48.0)

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

...ted です。 15575
この警告は「-W:no-deprecated」オプションで止められます。

//emlist{
def foo
class
<< Object.new
yield #=> warning: `yield' in class syntax will not be supported from Ruby 3.0. 15575
end
end
foo { p :ok }
//}

* 引数を転送する記法「(...)...
...sday?) #=> next Tuesday
//}
//emlist[Enumerator::Lazy#eager][ruby]{
a = %w(foo bar baz)
e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager
p e.class #=> Enumerator
p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"]
//}
//emlist[Enumerator::Lazy#with_index][ruby]{
("a"..).lazy...
...egateClassがブロックを受け付けるようになり、
Class
.newやStruct.newのように返り値のクラスのコンテキストで
module_evalするようになりました。

* ERB
* ERBのインスタンスをMarshalできないようになりました。

* IRB...

ruby 1.8.2 feature (48.0)

ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。

...見なされて
いるバグを修正しました。((<ruby-dev:23690>))

$ ruby1.8.1 -e 'class X;end; x=X.new; class << x;p self < X; end'
true

$ ruby1.8.2 -e 'class X;end; x=X.new; class << x;p self < X; end'
nil

=== 2004-06-04

: IO#gets, $_ [ruby] [change]
gets の返り...
..."]

=== 2004-05-10
: superclass mismatch [ruby] [change]
親クラスの違う同じ名前のクラスを再定義した時 TypeError を投げるようになりました。
((<ruby-list:39567>))

$ ruby-1.8.2 -e '
class
Foo
Bar = 1
end

class
Foo < String
Baz =...
...トされない限り Dir.glob('test/**/') は 'test/.test/' などに
マッチしなくなりました。((<ruby-dev:23014>))

=== 2004-02-20
: irb [lib] [new]
-I オプションが使えるようになりました。((<ruby-list:39243>))

=== 2004-02-18
: StringScanner#peep [lib] [obsolete]...

絞り込み条件を変える

NEWS for Ruby 2.5.0 (36.0)

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

...の場合:
//emlist{
{ (method key) => (counter) }
//}
* メソッドキーにはフォーマットがあります:
//emlist{
[class, method-name, start lineno, start column, end lineno, end column]
//}
* 例えば [Object, :foo, 1, 0, 7, 3] は Object#foo は1行目の0桁...
...ink_local? を追加 10912

* irb
* バックトレースとエラーメッセージを逆順で表示するようにしました 8661 [実験的]
* binding.irb を実行したときに自動的に irb を読み込みます 13099 [実験的]
* binding.irb を実行したときに周囲...
...#state.
* Ripper#state を追加。スキャナーの状態を伝えるためです。13686

* rdoc
* RDoc 6.0.1 に更新
* Replace IRB based lexer with Ripper.
* https://github.com/ruby/rdoc/pull/512
* This much improves the speed of generating documents.
*...

Thread#backtrace -> [String] | nil (36.0)

スレッドの現在のバックトレースを返します。

...//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.k...
<< 1 2 > >>