96件ヒット
[1-96件を表示]
(0.079秒)
キーワード
-
bigdecimal
/ ludcmp (11) -
bigdecimal
/ newton (11) - debug (11)
-
did
_ you _ mean (11) - find (11)
-
minitest
/ mock (10) -
minitest
/ spec (10) -
minitest
/ unit (10) -
test
/ unit (11)
検索結果
-
bigdecimal
/ ludcmp (6007.0) -
LU 分解を用いて、連立1次方程式 Ax = b の解 x を求める機能を提供します。
...LU 分解を用いて、連立1次方程式 Ax = b の解 x を求める機能を提供します。
Ruby のソースコード中の以下のサンプルスクリプトも参考にしてください。
* https://github.com/ruby/ruby/blob/master/ext/bigdecimal/sample/linear.rb... -
bigdecimal
/ newton (6007.0) -
ニュートン法を用いて非線形方程式 f(x) = 0 の解 x を求める機能を提供しま す。
...線形方程式 f(x) = 0 の解 x を求める機能を提供しま
す。
本サブライブラリは BigDecimal に依存しません。
実行例:
require "bigdecimal"
require "bigdecimal/newton"
...
n = Newton.nlsolve(f, x)
引数 f には関数を表すオブジェクトを指定......します。
: f.two
2.0 を示す値を返します。
: f.ten
10.0 を示す値を返します。
: f.eps
収束の基準になる epsilon 値を返します。2 つの値が異なる値かどうかを比
較するのに使用されます。|a - b| < f.eps となる 2 つの値は同......します。解が複数ある場合、
初期値によって得られる解が異なります。また,初期値によっては収束せずに
RuntimeError が発生する場合があります。実行後は引数 x は破壊的に
変更されます。x から解を取得します。
戻り値... -
did
_ you _ mean (6007.0) -
名前のタイポによって NameError や NoMethodError が起きたと きに、自動的に他の似た名前を提案してくれるライブラリです。
...ブラリです。
"Yuki".starts_with?("Y")
# => NoMethodError: undefined method `starts_with?' for "Yuki":String
# Did you mean? start_with?
デフォルトで有効になっており、無効にするにはコマンドラインオプションで
--disable=did_you_mean を指定しま......emファイルのみを同梱)です。詳しい内容は下
記のページを参照してください。
* rubygems.org: https://rubygems.org/gems/did_you_mean
* プロジェクトページ: https://github.com/ruby/did_you_mean
* リファレンス: https://www.rubydoc.info/gems/did_you_mean/... -
find (6007.0)
-
ディレクトリ配下のファイルを探索するためのモジュールです。
...ールです。
=== 使い方
require "find"
Find.find('/foo','/bar') {|f| ...}
または
require "find"
include Find
find('/foo','/bar') {|f| ...}
以下は、ruby のアーカイブに含まれるサンプルスクリプト
(https://github.com/ruby/ruby/blob/master/sample/troj......#! /usr/bin/env ruby
require "find"
# 他人が書き込み可能な危険なコマンドを探す
for dir in ENV['PATH'].split(File::PATH_SEPARATOR)
Find.find(dir) do |fpath|
if File.file?(fpath) and (File.stat(fpath).mode & 022) != 0
printf("file %s is writable from o... -
minitest
/ mock (6007.0) -
シンプルなモックライブラリです。
...gem(gemファイルのみを同梱)です。詳しい内容は下
記のページを参照してください。
* rubygems.org: https://rubygems.org/gems/minitest
* プロジェクトページ: https://github.com/seattlerb/minitest
* リファレンス: https://www.rubydoc.info/gems/minitest... -
minitest
/ spec (6007.0) -
BDD 風にテストを書くためのクラスやメソッドを定義するためのライブラリです。
...gem(gemファイルのみを同梱)です。詳しい内容は下
記のページを参照してください。
* rubygems.org: https://rubygems.org/gems/minitest
* プロジェクトページ: https://github.com/seattlerb/minitest
* リファレンス: https://www.rubydoc.info/gems/minitest... -
minitest
/ unit (6007.0) -
ユニットテストを行うためのライブラリです。
...gem(gemファイルのみを同梱)です。詳しい内容は下
記のページを参照してください。
* rubygems.org: https://rubygems.org/gems/minitest
* プロジェクトページ: https://github.com/seattlerb/minitest
* リファレンス: https://www.rubydoc.info/gems/minitest... -
test
/ unit (6007.0) -
ユニットテストを行うためのライブラリです。
...してください。
* Test::Unit - Ruby用単体テストフレームワーク: https://test-unit.github.io/
なお、2.2.0より前のtest/unit は当時バンドルしていた minitest/unit を使って再実装し
ていましたが、上記のtest/unitと完全な互換性がある訳で......クの歴史(2014年版) https://www.clear-code.com/blog/2014/11/6.html
* RubyKaigi 2015:The history of testing framework in Ruby https://www.clear-code.com/blog/2015/12/12.html
=== 使い方
Test::Unit は以下のように使います。
まずテスト対象のソース(foo.rb)が必......th to ruby; It'll have used at -j option
-q, --hide-skip Hide skipped tests
-b, --basedir=DIR Base directory of test suites.
-x, --exclude PATTERN Exclude test files on pattern.
-Idirectory Add library load path......史については以下が詳しくまとまっています。
* Rubyのテスティングフレームワークの歴史(2014年版) https://www.clear-code.com/blog/2014/11/6.html
* RubyKaigi 2015:The history of testing framework in Ruby https://www.clear-code.com/blog/2015/12/12.html... -
debug (19.0)
-
Ruby デバッガです。Ruby スクリプトのソースコードデバッグに使用します。
...た、Emacs を使用したインタフェース rubydb3x.el が
https://github.com/ruby/elisp にあるので、活用してください。
=== 使い方
$ ruby -rdebug foo.rb
または、Emacs から
M-x load-library rubydb3x.el
M-x rubydb
=== デバッグコマンド
以下は、......ります。
ここに挙げたもの以外を入力した場合、その入力を ruby の式として評価します。
: break
: break [<file>:]<position>|<class>:<method>
ブレークポイントを設定します。引数を省略した場合設定したブレークポ
イントを表......b です。
: catch <an Exception>
例外が発生した時にデバッガを停止させるキャッチポイントを設定します。
引数を省略した場合設定したキャッチポイントを表示します。
発生した例外が <an Exception> のサブクラスであ...