るりまサーチ

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

別のキーワード

  1. _builtin sub
  2. pathname sub
  3. string sub
  4. string sub!
  5. _builtin sub!

検索結果

<< < 1 2 3 > >>

NEWS for Ruby 3.0.0 (6066.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...n Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
sub
ject to autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166

//emlist[][ruby]{...
...8661

== Core classes updates

Outstanding ones only.

* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice /...

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

...スのスーパークラスは同じなのだそうです
((<ruby-bugs-ja:324>))。さあっぱりわかりません(^^;;

class << Object.new
class << self.superclass
p [self.id, self]
end
class << self
p [self.superclass.id, self.supe...
...けるのに疲れたらしい
^^;;)

: ((<Proc/Proc.new>)) [change]
: ((<組み込み関数/lambda>)) [change]
: ((<組み込み関数/proc>)) [change]

以下のように変更されました。((<ruby-dev:20358>))

* Proc.new およびブロック引数で与えられる Proc は...
...(<ruby-talk:72732>))

ENV['environ'] = 'value'
ENV['environ'].sub!(/value/, 'VALUE')
p ENV['environ']

=> ruby 1.6.8 (2002-12-24) [i586-linux]
"value"

この例のように sub! のような破壊的メソッドの効果がないため混乱すると...

ruby 1.9 feature (3492.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...* [regexp]: 正規表現の機能拡張
* [marshal]: Marshal ファイルのフォーマット変更
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど(互換性のある変更) (only backward-...
...: UNIXserver

削除

=== 2006-06-11

: __callee__ [new]
: __method__ [new]

((<URL:http://www.dm4lab.to/~usa/ruby/d/200606a.html#id20060610_P1_7>))

: Symbol#to_proc

=== 2006-06-10

* 新機能
: BasicObject が導入されました [new]
: local という visibility および Module#loca...
...06-01-10
: ((<GC/GC.stress>)) [new]
: ((<GC/GC.stress=>)) [new]

GC.stress = true とすると、GC を行えるすべての機会で GC を行います。

=== 2005-12-15

: sub [obsolete]
: gsub [obsolete]
: sub! [obsolete]
: gsub! [obsolete]
: chop...

ruby 1.8.3 feature (3378.0)

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

...* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on...
...ry_secure [lib] [new]
: FileUtils.remove_entry [lib] [new]
: FileUtils.chmod_R [lib] [new]
: FileUtils.chown [lib] [new]
: FileUtils.chown_R [lib] [new]
: FileUtils.commands [lib] [new]
: FileUtils.options [lib] [new]
: FileUtils.ha...
...[lib] [new]

: Net::HTTPHeader#content_length= [lib] [new]
: Net::HTTPHeader#content_type [lib] [new]
: Net::HTTPHeader#main_type [lib] [new]
: Net::HTTPHeader#sub_type [lib] [new]
: Net::HTTPHeader#type_params [lib] [new]
: Net::HTTPHeader#content_type= [lib] [new]
: Net...

ruby 1.6 feature (3372.0)

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

...00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテラル/式展開>))

stable snapshot で、一...
...変更は元に戻りました。

p "#{ "" }"

=> ruby 1.6.7 (2002-03-01) [i586-linux]
""

=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"

=> ruby 1.6.7 (2002-09-25) [i586-linux]
""...
...フォルト値 (((<Hash/default>))) も == で等しい
ときに等しいとみなされるようになりました。

p Hash.new("foo") == Hash.new("bar")

=> ruby 1.6.7 (2002-03-01) [i586-linux]
true
=> ruby 1.6.7 (2002-08-21) [i586-linux]
false...

絞り込み条件を変える

Win32::Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) (3102.0)

@todo

...@todo

レジストリキー key 下のキー subkey を開き,
開いたキーを表す Win32::Registry オブジェクトを返します。
key は親のキーを Win32::Registry オブジェクトで指定します。
親のキーには定義済キー HKEY_* を使用できます (⇒Win32::Reg...

Win32::Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) {|reg| ... } (3102.0)

@todo

...@todo

レジストリキー key 下のキー subkey を開き,
開いたキーを表す Win32::Registry オブジェクトを返します。
key は親のキーを Win32::Registry オブジェクトで指定します。
親のキーには定義済キー HKEY_* を使用できます (⇒Win32::Reg...

Data.define(*args) {|subclass| block } -> Class (148.0)

Data クラスに新しいサブクラスを作って、それを返します。

...[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
p fred.name # => "Fred"
p fred.age # => 5
//}

メンバの値を書き換えることはできません。

//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
fred.age = 6 # => NoMethodError
//}

...
...get(url)
# ダミーの実装
if url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end

def fetch(url)
fetcher = HTTPFetcher.new
case fetcher.get(url)
in HTTPFetcher::Response(body)
body
in HTTPFetcher::...
...にも渡されます。

//emlist[例][ruby]{
Customer = Data.define(:name, :address) do
def greeting
"Hello #{name}!"
end
end
p Customer.new("Dave", "123 Main").greeting # => "Hello Dave!"
//}

なお、Dataのサブクラスのインスタンスを生成する際にオプション引数...

openssl (54.0)

OpenSSL(https://www.openssl.org/) を Ruby から扱うためのライブラリです。

...nssl'

key = OpenSSL::PKey::RSA.new(1024)
digest = OpenSSL::Digest::SHA1.new()

issu = sub = OpenSSL::X509::Name.new()
sub
.add_entry('C', 'JP')
sub
.add_entry('ST', 'Shimane')
sub
.add_entry('CN', 'Ruby Taro')

cer = OpenSSL::X509::Certificate.new()
cer.not_before = Time.at(0)...
...cer.not_after = Time.at(0)
cer.public_key = key # <= 署名する対象となる公開鍵
cer.serial = 1
cer.issuer = issu
cer.subject = sub

cer.sign(key, digest) # <= 署名するのに使う秘密鍵とハッシュ関数
print cer.to_text

===[a:references] 参考文献
* 5246...

WIN32OLE::ARGV -> [object] (30.0)

直前のメソッド呼び出しの引数を格納した配列です。

...B (OLE Automation server)
Public Sub Accm(ByVal Operator, ByRef Accumulator, ByVal Operand)
If Operator = "*" Then
Accmulator = Accmulator * Operand
Else If Operator = "+" Then
Accmulator = Accmulator + Operand
End If
End Sub

# Ruby
x = 10
obj.Accm '...
...させるために、呼び出し側でARGVを消去してください。

' VB (OLE Automation server)
Public Sub GetInterface(ByRef obj)
Set Obj = New OleObject
End Sub

# Ruby
obj.GetInterface nil # 引数の数を合わせるためダミー引数を指定
WIN32OLE::ARGV.clea...

絞り込み条件を変える

Method#super_method -> Method | nil (24.0)

self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。

...ethod

//emlist[例][ruby]{
class Super
def foo
"superclass method"
end
end

class Sub < Super
def foo
"subclass method"
end
end

m = Sub.new.method(:foo) # => #<Method: Sub#foo>
m.call # => "subclass method"
m.super_method # => #<Method: Super#foo>
m.super_method.call # => "supercla...
<< < 1 2 3 > >>