るりまサーチ

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

別のキーワード

  1. uri default_port
  2. _builtin default
  3. generic default_port
  4. socket ai_default
  5. socket ip_default_multicast_loop

検索結果

Rake::Cloneable#clone -> object (21137.0)

自身を複製します。

...ています。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
clone
= file_list.clone
clone
# => ["a.c", "b.c"]
clone
.exclude("a.c")
clone
== file_list # => false
end
//}...

Rake::Cloneable#dup -> object (3024.0)

自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を 全て新たに作成したオブジェクトにコピーします。

...st[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.freeze
dup = file_list.dup
clone
= file_list.clone
dup.exclude("a.c") # => ["b.c"]
clone
.exclude("a.c") # => can't modify frozen Rake::FileL...

NEWS for Ruby 2.0.0 (114.0)

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

...します

* Hash
* 追加: Hash#to_h 明示的に変換するメソッドです。Array#to_a に似ています
* 拡張: Hash#default_proc= default proc をクリアするために nil を渡せるようになりました

* IO
* 非推奨: IO#lines, #bytes, #chars, #codepoints...
...at thread creation.
default
: 128KB (32bit CPU) or 256KB (64bit CPU).
* RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
creation. default: 512KB or 1024KB.
* RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
default
: 64KB or 128KB....
...respond_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...

NEWS for Ruby 3.0.0 (96.0)

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

...l:label-TypeProf] is experimentally bundled. It is a
type analysis tool for Ruby programs.
* Deprecation warnings are no longer shown by default (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 n...
...it may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Dir
* Dir.glob and Dir.[] now sort the results by default, and accept the `sort:` keyword option. 8709
* ENV
* ENV.except has been added, which returns a hash excluding the given keys and their va...
...O#nonblock? now defaults to `true`. 16786
* IO#wait_readable, IO#wait_writable, IO#read, IO#write and other related methods (e.g. IO#puts, IO#gets) may invoke the scheduler hook `#io_wait(io, events, timeout)` in a non-blocking execution context. 16786
* Kernel
* Kernel#clone when called w...

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

...merge は、hash.dup.update と同じ。
Hash#merge! は、Hash#update の別名 ((<ruby-talk:59777>)), ((<ruby-dev:19463>))

: ((<Hash#default_proc|Hash/default_proc>)) [new]

追加 ((<ruby-dev:17966>))

=== IO

: ((<IO/IO.sysopen>)) [new]
: ((<Socket#sysaccept|Socket/sysaccept>)) [new]
: ((<T...
...(<組み込み関数/trap>)) [compat]

あるシグナルに対して、SIG_DFL や SIG_IGN が割り当てられていた場合、
文字列 "DEFAULT" や "IGNORE" を返すようになりました(以前は、nil を返
していました) ((<ruby-talk:67860>))

: ((<組み込み関数/syste...
...-dev:16183>))

一つ一つ include した場合とは逆順になります。

=== Object

: ((<Object#clone|Object/clone>)) [change]

Numeric など immutable なオブジェクトは clone できなくなりました。
((<ruby-bugs-ja:PR#94>)), ((<rubyist:0831>))

=== Range

: ((<Range#max...

絞り込み条件を変える

クラス/メソッドの定義 (18.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...す。この構文の内部で定義したメソッドや定数は指定した
オブジェクトに対してだけ有効になります。
Object#clone で生成したオブジェクトには引き継がれますが,
Object#dup で生成したオブジェクトには引き継がれません.

r...
...list[例][ruby]{
def fact(n)
if n == 1 then
1
else
n * fact(n-1)
end
end
//}

文法:

def メソッド名 ['(' [arg0 ['=' default0]] ... [',' '*' rest_args [, post ...]] [',' key1: [val1]] ... [',' '**'kwrest] [',' '&' block_arg]`)']
式.. (body)
[rescu...
...メソッド定義

//emlist[例][ruby]{
def foo.test
print "this is foo\n"
end
//}

文法:

def 式 `.' 識別子 [`(' [引数 [`=' default]] ... [`,' `*' 引数 ]`)']
式..
[rescue [error_type,..] [=> evar] [then]
式..]..
[else...

NEWS for Ruby 2.4.0 (12.0)

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

...IO#readlines, IO.foreach は
chomp というキーワード引数を受け付けるようになりました。12553

* Kernel
* Kernel#clone は freeze というキーワード引数を受け付けるようになりました。
12300

* MatchData
* MatchData#named_captures...
...0

=== C API の更新

* ruby_show_version() will no longer exits the process, if
RUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in
the future.

* rb_gc_adjust_memory_usage() [Feature #12690]

=== サポートするプラットフォームの変更

* FreeBSD < 4...

NEWS for Ruby 2.5.0 (12.0)

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

...に更新
* BigDecimal::VERSION を追加
* 非推奨(1.4.0で削除予定)
* BigDecimal.new
* BigDecimal.ver
* BigDecimal#clone と BigDecimal#dup は新しいインスタンスを作らなくなりました。selfを返します。

* coverage
* ブランチカバレ...
...=== 標準添付ライブラリの互換性(機能追加とバグ修正を除く)

* Gemification
* 以下の標準添付ライブラリをdefault gemsに変更しました
* cmath
* csv
* date
* dbm
* etc
* fcntl
* fiddle
* fileutils
* g...