るりまサーチ

最速Rubyリファレンスマニュアル検索!
988件ヒット [201-300件を表示] (0.023秒)
トップページ > クエリ:class[x] > クエリ:initialize[x]

別のキーワード

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

ライブラリ

クラス

検索結果

<< < 1 2 3 4 5 ... > >>

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

==...
...el
* Kernel#clone when called with the `freeze: false` keyword will call `#initialize_clone` with the `freeze: false` keyword. 14266
* Kernel#clone when called with the `freeze: true` keyword will call `#initialize_clone` with the `freeze: true` keyword, and will return a frozen copy even if...

ruby 1.8.4 feature (102.0)

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

...* ((<ruby 1.8.4 feature/"Ruby/Tk">))
* ((<ruby 1.8.4 feature/REXML [compat]>))
* ((<ruby 1.8.4 feature/TCPSocket#initialize [bug]>))
* ((<ruby 1.8.4 feature/TCPServer#initialize [bug]>))
* ((<ruby 1.8.4 feature/"optparse">))
* ((<ruby 1.8.4 feature/"find">))
* ((<ruby 1.8.4 feature/Iconv...
...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...

ruby 1.8.3 feature (96.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...は、$SAFE レベル が 0 のとき
禁止されるようになりました。

$ cat mthd_taint.rb
th = Thread.new{
$SAFE = 3
class
Hoge
def foo
puts "safe level: #{$SAFE}"
end
end
}
th.join
p $SAFE
Hoge.new.foo

$ ruby...
...: Module#class_variable_get [ruby] [new]
: Module#class_variable_set [ruby] [new]

クラスメソッドから((<変数と定数/クラス変数>))にアクセスするための
((<Module#class_variable_get|Module/class_variable_get>)) と
((<Module#class_variable_set|Module/class_variable_...
...あるという警告は、
オプションに -w を付けた時に出ます。((<ruby-dev:26201>))

=== 2005-05-22
: OpenSSL::SSL::SSLServer#initialize(svr, ctx, session_id=nil)
session_id を受け付けるようになりました。((<ruby-core:4663>))

=== 2005-05-19
: REXML::Encoding#decod...

NEWS for Ruby 3.1.0 (66.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...
...ックすることができます。 17795

* Struct
* 新規メソッド
* StructClass#keyword_init? が追加されました。 18008
* 変更されたメソッド
* Struct#initialize はキーワード引数のみを渡すと警告されるようになりました。ハッ...

ruby 1.8.2 feature (66.0)

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

...CGI::Session#initialize [lib] [compat]
'no_hidden' オプションを指定できるようになりました。((<ruby-talk:123850>))

=== 2004-12-16

: Hash#eql? [ruby] [obsolete]
: Hash#hash [ruby] [obsolete]

削除
((<ruby-dev:25206>))?

=== 2004-12-14
: CGI::Session.initialize [lib] [chan...
...v:24896>))

=== 2004-11-16
: Test::Unit::AutoRunner.options [lib] [compat]
add new option --exclude (-x). ((<ruby-dev:24865>))

: CGI::Session.initialize [lib] [compat]
'sufix' オプションを設定できるようになりました。

=== 2004-11-10
: Array#pack [ruby] [change]
P 指定子...
...見なされて
いるバグを修正しました。((<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 の返り...

絞り込み条件を変える

rdoc (54.0)

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

...source directory. Default is
the current directory.

: --page-dir dir

Directory where guides, your FAQ or other pages not associated with
a class live. Set this when you don't store such files at your
project root. NOTE: Do not use the same file name in the page dir
and the root of your...
...。これをオフにしたい場合は all 修飾
子を加えます。

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

以上のコードでは、SM::Input のドキュメントのみが出力され...
...ew:

これはインスタンスメソッドの initialize にのみ適用できます。通常、
RDoc は initialize メソッドのドキュメントやパラメータを実際にはクラス
メソッド new のものと仮定し、initialize の代わりに new を出力しま
す。:no...

Observable (48.0)

Observer パターンを提供するモジュールです。

...バの update メソッドに渡されます。

=== サンプルコード
require "observer"

class
Ticker ### Periodically fetch a stock price.
include Observable

def initialize(symbol)
@symbol = symbol
end

def run
last_price = nil
loop do
p...
...sleep 1
end
end
end

class
Price ### A mock class to fetch a stock price (60 - 140).
def self.fetch(symbol)
60 + rand(80)
end
end

class
Warner ### An abstract observer of Ticker objects.
def initialize(ticker, limit)
@limit = limit...
...ticker.add_observer(self)
end
end

class
WarnLow < Warner
def update(time, price) # callback for observer
if price < @limit
print "--- #{time.to_s}: Price below #@limit: #{price}\n"
end
end
end

class
WarnHigh < Warner
def update(time, price)...

NEWS for Ruby 2.0.0 (42.0)

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

...' で始まる使用されていない変数は警告しなくなりました

=== 組み込みクラスの更新

* ARGF.class
* 追加: ARGF.class#codepoints, ARGF.class#each_codepoint
IO にある同名のメソッドに対応します

* Array
* 追加: Array#bsearch 二分探...
...した。そのようなときは ThreadError が発生します
* Mutex#sleep may spurious wakeup. Check after wakeup.

* NilClass
* 追加: NilClass#to_h 空のハッシュを返します

* ObjectSpace::WeakMap
* 弱い参照を保持するための低レベルのクラスです...
...ond_to? against a protected method now returns false
unless the second argument is true.

* Object#respond_to_missing?, Object#initialize_clone, Object#initialize_dup
* private になりました

* Thread#join, Thread#value
* 上を参照

* Mutex#lock, Mutex#unlock, Mutex#try_loc...

ObjectSpace.#define_finalizer(obj) {|id| ...} -> Array (36.0)

obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。

...実行されます。

=== 使い方の注意

以下は、define_finalizer の使い方の悪い例です。

//emlist[悪い例][ruby]{
class
Foo
def initialize
ObjectSpace.define_finalizer(self) {
puts "foo"
}
end
end
Foo.new
GC.start
//}

これは、渡された proc の self...
...キストで Proc を
生成することで上記の問題を回避しています。

//emlist[例][ruby]{
class
Bar
def Bar.callback
proc {
puts "bar"
}
end
def initialize
ObjectSpace.define_finalizer(self, Bar.callback)
end
end
Bar.new
GC.start
//}

proc の呼び出し...
...ちは -d オプションで
事前に例外の発生の有無を確認しておいた方が良いでしょう。

//emlist[例][ruby]{
class
Baz
def initialize
ObjectSpace.define_finalizer self, eval(%q{
proc {
raise "baz" rescue puts $!
raise "baz2"
puts "baz3"...

ObjectSpace.#define_finalizer(obj, proc) -> Array (36.0)

obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。

...実行されます。

=== 使い方の注意

以下は、define_finalizer の使い方の悪い例です。

//emlist[悪い例][ruby]{
class
Foo
def initialize
ObjectSpace.define_finalizer(self) {
puts "foo"
}
end
end
Foo.new
GC.start
//}

これは、渡された proc の self...
...キストで Proc を
生成することで上記の問題を回避しています。

//emlist[例][ruby]{
class
Bar
def Bar.callback
proc {
puts "bar"
}
end
def initialize
ObjectSpace.define_finalizer(self, Bar.callback)
end
end
Bar.new
GC.start
//}

proc の呼び出し...
...ちは -d オプションで
事前に例外の発生の有無を確認しておいた方が良いでしょう。

//emlist[例][ruby]{
class
Baz
def initialize
ObjectSpace.define_finalizer self, eval(%q{
proc {
raise "baz" rescue puts $!
raise "baz2"
puts "baz3"...

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>