るりまサーチ

最速Rubyリファレンスマニュアル検索!
155件ヒット [1-100件を表示] (0.147秒)
トップページ > クエリ:I[x] > クエリ:ruby[x] > クエリ:u[x] > クエリ:using[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

検索結果

<< 1 2 > >>

main.using(module) -> self (33325.0)

引数で指定したモジュールで定義された拡張を有効にします。

...* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

//emlist[例][ruby]{
module Sloth
refine String do
def downcase
self
end
end
end

"ABC".downcase # => "abc"

using
Sloth

"ABC".dow...
...ncase # => "ABC"
//}

@see Module#refine, Module#using...

Module#using(module) -> self (30313.0)

引数で指定したモジュールで定義された拡張を現在のクラス、モジュールで有 効にします。

...ルで有
効にします。

有効にした拡張の有効範囲については以下を参照してください。

* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

@see Module#refine, main.using...

rubygems/security (18066.0)

このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。

...このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。

=== 署名付きの Gem パッケージ

==== 目次

* 概要
* 解説
* コマンドラインオプション
* OpenSSL リファレンス
* Bugs / TODO
* 作者について

==== 概...
...とそれらを作成することができます。

# gemmaster@example.com のための秘密鍵と証明書を作成します
$ gem cert --build gemmaster@example.com

あなたのコンピュータの性能にもよりますが、これには 5 秒から 10 分程度かかります。
(公...
... Imlib2-Ruby-0.5.0.gem
data.tar.gz
data.tar.gz.sig
metadata.gz
metadata.gz.sig

さあ、署名を検証してみましょう。以下のように "-P HighSecurity" オプションを
付けて Gem をインストールしてみてください。

# install the gem with using the secu...

Module#refine(klass) { ... } -> Module (9236.0)

引数 klass で指定したクラスまたはモジュールだけに対して、ブロックで指定した機能を提供で きるモジュールを定義します。定義した機能は Module#refine を使用せずに直 接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。 そのため、既存の機能を局所的に修正したい場合などに用いる事ができます。

...定義した機能は Module#refine を使用せずに直
接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。
そのため、既存の機能を局所的に修正したい場合などに用いる事ができます。

refinements 機能の詳細...
...ては以下を参照してください。

* https://magazine.rubyist.net/articles/0041/0041-200Special-refinement.html
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html

定義した機能は main.using, Module#using を実行した場合のみ
有効になります。

@param...
...ます。

@return ブロックで指定した機能を持つ無名のモジュールを返します。


//emlist[例][ruby]{
class C
def foo
puts "C#foo"
end
end

module M
refine C do
def foo
puts "C#foo in M"
end
end
end

x = C.new
x.foo # => "C#foo"

using
M

x = C.new...

Ruby用語集 (6907.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...
...String における文字の位置、
といったものは 0 オリジンである。

: 1 オリジン
: one-based
番号が 1 から始まること。

例えば、
エラーメッセージにおける行番号、
正規表現検索におけるキャプチャーの番号、
Ruby
2.7...
...===[a:B] B

: Bignum
Ruby
2.3 系までは、即値で実装されない絶対値の大きな整数オブジェクトが属す
クラスだった。Ruby 2.4 で Fixnum と共に Integer に一本化された。
このとき Bignum は形式的には残されたが単なる Integer のエイ...

絞り込み条件を変える

NEWS for Ruby 2.7.0 (6501.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

* パターンマッチが実験的機能として導入されました。 14912

//emlist[][ruby]{
case [0, [1, 2, 3]]
i
n [a, [b, *c]]
p...
...
呼び出すと警告が表示されるようになりました。

//emlist[][ruby]{
def foo
proc
end
foo { puts "Hello" } #=> warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead
//}

* 非推奨に関する警告を止めたい場合は、コマン...

bigdecimal (6234.0)

bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。

...bigdecimal は浮動小数点数演算ライブラリです。
任意の精度で 10 進表現された浮動小数点数を扱えます。

//emlist[][ruby]{
require 'bigdecimal'
a = BigDecimal("0.123456789123456789")
b = BigDecimal("123456.78912345678", 40)
print a + b # => 0.123456912580245903456...
...BigDecimal では正確な値を得る事ができます。

//emlist[例1: 0.0001 を 10000 回足す場合。][ruby]{
sum = 0
for i in (1..10000)
sum = sum + 0.0001
end
print sum # => 0.9999999999999062
//}

//emlist[例2: 0.0001 を 10000 回足す場合。(BigDecimal)][ruby]{
require 'bigdecim...
...

//emlist[pi.rb][ruby]{
#!/usr/local/bin/ruby

require "bigdecimal"
#
# Calculates 3.1415.... (the number of times that a circle's diameter
# will fit around the circle) using J. Machin's formula.
#
def big_pi(sig) # sig: Number of significant figures
exp = -sig
pi = BigDecimal("0")...

NEWS for Ruby 3.0.0 (6225.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...eyword arguments are now separated from 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 mat...
...module M1; end
module M2; end
C.include M1
M1.include M2
p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject]
//}

* Mutex
* `Mutex` is now acquired per-`Fiber` instead of per-`Thread`. This change should be compatible for essentially all usages and avoids blocking when using a scheduler...

Refinement#import_methods(*modules) -> self (6224.0)

モジュールからメソッドをインポートします。

...ッドをインポートします。

Module#includeと違って、import_methods はメソッドをコピーして
refinement に追加して、refinementでインポートしたメソッドを有効化します。

メソッドをコピーするため、Rubyコードで定義されたメソッド...
...list[][ruby]{
module StrUtils
def indent(level)
' ' * level + self
end
end

module M
refine String do
i
mport_methods StrUtils
end
end

using
M
p "foo".indent(3) # => " foo"

module M
refine String do
i
mport_methods Enumerable
# Can't import method which is not defined wit...
...h Ruby code: Enumerable#drop
end
end
//}...

NEWS for Ruby 2.1.0 (6213.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.0.0 以降の変更

=== 言語仕様の変更

* キーワード引数のデフォルト値が省略可能になりました。これらの「必須キーワード引数」は呼び出し時に明...
...: IO#write_nonblock シンボルを返すためにキーワード引数 `exception: false` を受け付けるようになりました

* Kernel
* 追加: Kernel#singleton_method(Object#singleton_method)

* Module
* 追加: Module#using, which activates refinements of the specified module...

絞り込み条件を変える

NEWS for Ruby 2.0.0 (6099.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
*...
...eturns US-ASCII encoding instead of BINARY.

* TracePoint
* new class. This class is replacement of set_trace_func.
Easy to use and efficient implementation.

* toplevel
* added method:
* added main.define_method which defines a global function.
* added main.using, whic...
<< 1 2 > >>