ライブラリ
- ビルトイン (558)
- csv (36)
- fileutils (252)
- kconv (24)
-
rake
/ packagetask (12) -
rubygems
/ dependency _ installer (24) -
rubygems
/ installer (12) - socket (24)
クラス
- CSV (36)
- Encoding (24)
-
Encoding
:: Converter (72) -
Enumerator
:: Lazy (332) -
Gem
:: DependencyInstaller (24) -
Gem
:: Installer (12) -
RDoc
:: Options (24) -
Rake
:: PackageTask (12) - Regexp (12)
- Socket (12)
- String (94)
モジュール
- Enumerable (12)
- FileUtils (252)
-
Gem
:: InstallUpdateOptions (12) - Kconv (12)
-
Socket
:: Constants (12)
キーワード
-
DEFAULT
_ OPTIONS (24) -
IP
_ ONESBCAST (24) - InvalidByteSequenceError (12)
-
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (4) - String (12)
- chunk (24)
- collect (12)
-
collect
_ concat (12) - compatible? (12)
- convert (12)
-
cp
_ r (12) - drop (12)
-
drop
_ while (12) - encode (36)
- filter (7)
-
filter
_ map (6) -
find
_ all (12) -
fixed
_ encoding? (12) -
flat
_ map (12) -
force
_ encoding (12) -
force
_ output (12) -
force
_ quotes? (12) -
force
_ update (12) - grep (12)
-
grep
_ v (10) -
insert
_ output (12) -
install
_ update _ defaults _ str (12) - iseuc (12)
- isjis (12)
- lazy (12)
- link (12)
- ln (12)
-
ln
_ s (12) -
ln
_ sf (12) - map (12)
- move (12)
- mv (12)
- new (60)
-
primitive
_ convert (48) - rdoc (12)
- reject (12)
- remove (12)
-
remove
_ dir (12) -
remove
_ entry (12) -
remove
_ entry _ secure (12) -
remove
_ file (12) - replicate (12)
- rm (12)
-
rm
_ f (12) -
rm
_ r (12) -
rm
_ rf (12) - rmtree (12)
-
ruby 1
. 8 . 2 feature (12) -
rubygems
/ commands / install _ command (12) -
rubygems
/ commands / uninstall _ command (12) -
safe
_ unlink (12) - select (12)
-
slice
_ after (22) -
slice
_ before (36) -
slice
_ when (11) - symlink (12)
- take (12)
-
take
_ while (24) -
unicode
_ normalize (11) -
unicode
_ normalized? (11) -
valid
_ encoding? (12) -
with
_ index (12) - zip (24)
- 多言語化 (12)
検索結果
先頭5件
-
Enumerator
:: Lazy # force(*args) -> [object] (18207.0) -
全ての要素を含む配列を返します。Lazy から実際に値を取り出すのに使います。
...要素を含む配列を返します。Lazy から実際に値を取り出すのに使います。
Enumerable#to_a のエイリアスです。
//emlist[例][ruby]{
1.step.lazy.take(10).force
# => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
1.step.lazy.take(10).to_a
# => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
//}... -
RDoc
:: Options # force _ output -> bool (6249.0) -
コマンドライン引数の --force_output オプションを指定していた場合、true を返します。--no-force_output オプションを指定していた場合、false を返 します。
...コマンドライン引数の --force_output オプションを指定していた場合、true
を返します。--no-force_output オプションを指定していた場合、false を返
します。
どちらも指定しなかった場合は true を返します。... -
String
# force _ encoding(encoding) -> self (6243.0) -
文字列の持つエンコーディング情報を指定された encoding に変えます。
...#=> ASCII-8BIT
p s.force_encoding("EUC-JP") #=> "いろは"
p s.force_encoding(Encoding::EUC_JP) #=> "いろは"
u = [12411, 12408, 12392].pack("U*")
u.force_encoding("UTF-8") #=> "ほへと"
u.force_encoding(Encoding::UTF_8)... -
CSV
# force _ quotes? -> bool (6225.0) -
出力される全てのフィールドがクオートされる場合は、真を返します。
...V.generate(force_quotes: false) do |csv|
rows.each { |row| csv << row }
csv.force_quotes? # => false
end
print result
# => header1,header2
# "row1_1,",row1_2
//}
//emlist[例][ruby]{
require "csv"
rows = [["header1", "header2"], ["row1_1,", "row1_2"]]
result = CSV.generate(force_quotes: tr......ue) do |csv|
rows.each { |row| csv << row }
csv.force_quotes? # => true
end
print result
# => true
# => "header1","header2"
# "row1_1,","row1_2"
//}
@see CSV.new... -
RDoc
:: Options # force _ update -> bool (6217.0) -
コマンドライン引数の --force_update を指定していた場合に true を返しま す。そうでない場合は false を返します。
...コマンドライン引数の --force_update を指定していた場合に true を返しま
す。そうでない場合は false を返します。... -
ruby 1
. 8 . 2 feature (1278.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響の範囲が小さいと思われる変更
* [change]: 変更されたクラス/メソッドなど(互換性のない......の?)
* [obsolete]: 廃止された(される予定の)機能
* [platform]: 対応プラットフォームの追加
== 1.8.1 (2003-12-25) -> 1.8.2 (2004-12-25)
* cgi/session においてクライアントからセッション ID を指定できてしまうバグが
修正されました......ました。
=== 2004-08-23
: OpenSSL::SSL#pending [lib] [new]
=== 2004-08-14
: FileUtils.copy_entry [lib] [new]
: FileUtils::DryRun [lib] [new]
追加。
: FileUtils.mv [lib] [compat]
mv が :force オプションを受け付けるようになりました。
=== 2004-08-07
: Zlib::GzipReader... -
多言語化 (452.0)
-
多言語化 Ruby は US-ASCII はもちろん、US-ASCII 以外の文字エンコーディングもサポートしています。 文字列の内部表現のエンコーディングは固定されておらず、 プログラマは目的に応じて使用するエンコーディングを選ぶことができます。
...多言語化
Ruby は US-ASCII はもちろん、US-ASCII 以外の文字エンコーディングもサポートしています。
文字列の内部表現のエンコーディングは固定されておらず、
プログラマは目的に応じて使用するエンコーディングを選ぶこ......を生成して返します。
Ruby 1.9 ではこれを用いてエンコーディングを変換するのが標準的なやり方です。
String#force_encoding メソッドは文字列のエンコーディング情報を破壊的に書き換えます。
新しい文字列は生成されません....../emlist[例][ruby]{
"いろは".encode("Shift_JIS")
"\xA4\xA4\xA4\xED\xA4\xCF".force_encoding("EUC-JP")
//}
====[a:ruby18] Ruby 1.8 からの移行
Ruby 1.8 からの移行措置として、コマンドオプション -K を指定すれば
Ruby 1.8 用に書かれたスクリプトもできる限... -
NEWS for Ruby 2
. 7 . 0 (348.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.6.0 以降の変更
=== 言語仕様の変更
==== パターンマッチ
* パターンマ......=> [2, 3]
end
//}
//emlist[][ruby]{
case {a: 0, b: 1}
in {a: 0, x: 1}
:unreachable
in {a: 0, b: var}
p var #=> 1
end
//}
//emlist[][ruby]{
case -1
in 0 then :unreachable
in 1 then :unreachable
end #=> NoMatchingPatternError
//}
//emlist{
json = <<END
{
"name": "Alice",
"age": 30,
"child......FOO!?", "BAR!?", "BAZ!?"]
//}
//emlist[Enumerator::Lazy#with_index][ruby]{
("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
# => 1:a
# 2:b
# 3:c
//}
* Fiber
* 新規メソッド
* Fiber#raiseメソッドが追加され、Fiber#resumeのように... -
rdoc (282.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
...れば、'rdoc' コマンドでドキュメントが生成できます。
(Windows では 'rdoc.bat' です)
$ rdoc [options] [names...]
"rdoc --help" と打てば、最新のオプションに関する情報が得られます。
$ rdoc
このコマンドでカレントディレクトリ以......とができます。
例えば、Rdoc そのもののドキュメントを生成する場合は、以下のようにタイプ
します。
$ rdoc --main rdoc/rdoc.rb
RDoc が生成するドキュメントのコメント部で使える様々なマークアップの方法
は以下の markup の......義されているクラスは複数の四角にまたがった図が作られます。--diagram
といっしょに使わなければ意味のないオプションです。(実験的な機能です)
: --force-update
出力済みのファイルの方が新しい場合でも全てのファイ...