ライブラリ
- English (48)
- ビルトイン (536)
- csv (12)
-
irb
/ cmd / help (12) -
net
/ telnet (8) - pathname (12)
-
rdoc
/ context (12) -
rexml
/ document (12) -
rinda
/ rinda (12) -
rubygems
/ gem _ path _ searcher (12) - scanf (30)
- strscan (144)
クラス
-
Gem
:: GemPathSearcher (12) -
IRB
:: ExtendCommand :: Help (12) - MatchData (158)
-
Net
:: Telnet (8) - Pathname (12)
-
RDoc
:: Context (12) -
REXML
:: Entity (12) - Regexp (60)
-
Scanf
:: FormatSpecifier (6) -
Scanf
:: FormatString (24) - String (81)
- StringScanner (144)
- Symbol (21)
モジュール
- Kernel (240)
キーワード
-
$ & (12) -
$ & # 39; (12) -
$ 1 (12) -
$ 10 (12) -
$ 11 (12) -
$ 2 (12) -
$ 3 (12) -
$ 4 (12) -
$ 5 (12) -
$ 6 (12) -
$ 7 (12) -
$ 8 (12) -
$ 9 (12) -
$ LAST _ PAREN _ MATCH (12) -
$ MATCH (12) -
$ POSTMATCH (12) -
$ PREMATCH (12) -
$ ` (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - =~ (12)
- CSV (12)
- MatchData (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Regexp (12)
- Template (12)
- [] (48)
- captures (12)
-
check
_ until (12) - cmd (4)
- compile (12)
- deconstruct (2)
- execute (12)
- gsub (24)
- gsub! (12)
- inspect (12)
- irb (12)
-
last
_ match (24) -
last
_ match _ tried (6) - match? (30)
- matched (12)
- matched? (12)
-
matched
_ count (6) -
matched
_ size (12) -
matched
_ string (6) - matchedsize (12)
- matches? (12)
-
matching
_ files (12) - names (12)
- new (12)
-
post
_ match (24) -
pre
_ match (24) - prune (6)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
scan
_ full (12) -
scan
_ until (12) -
skip
_ until (12) - sub (36)
- sub! (12)
-
to
_ a (12) -
to
_ s (12) -
unmatched
_ alias _ lists (12) - unscan (12)
-
values
_ at (12) - waitfor (4)
- クラス/メソッドの定義 (12)
- パターンマッチ (12)
- 正規表現 (12)
検索結果
先頭5件
-
CSV (54.0)
-
このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。
...込み
csv_string = CSV.generate do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["another", "row"]
# ...
end
//}
=== 一行変換
//emlist[][ruby]{
require 'csv'
csv_string = ["CSV", "data"].to_csv # => "CSV,data"
csv_array = "CSV,String".parse_csv # => ["CSV", "String"]
//}
===......%w{my data here} } # to a String
CSV($stderr) { |csv_err| csv_err << %w{my data here} } # to $stderr
//}
=== CSV と文字エンコーディング (M17n or Multilingualization)
This new CSV parser is m17n savvy. The parser works in the Encoding of the IO
or String object being read from or......ourse, to accomplish this multiencoding
support. For example, <tt>:col_sep</tt>, <tt>:row_sep</tt>, and
<tt>:quote_char</tt> must be transcoded to match your data. Hopefully this
makes the entire process feel transparent, since CSV's defaults should just
magically work for you data. However, you... -
NEWS for Ruby 2
. 2 . 0 (54.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...を書き込みモードで開くようになりました
* String
* 追加: String#unicode_normalize
* 追加: String#unicode_normalize!
* 追加: String#unicode_normalized?
* Symbol
* 改善: String#to_sym, String#intern によって返される多くのシンボルがGC可......er raised when lambda Proc is passed as a
block, and the number of yielded arguments does not match the formal
arguments of the lambda, if just an array is yielded and its length
matches.
* Process
* Process.spawn のようなプロセスを起動するようなメソッド......影響のある変更
なし
=== C API の更新
* 非推奨のAPIを削除しました 9502
* Check_SafeStr -> SafeStringValue
* rb_check_safe_str -> SafeStringValue
* rb_quad_pack -> rb_integer_pack
* rb_quad_unpack -> rb_integer_unpack
* rb_read_check : access struct FIL... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (48.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......an use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -> matchdata or nil
str.match(pattern, pos) -> matchdata or nil
...... -
NEWS for Ruby 3
. 1 . 0 (48.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...を除き、すべてfreezeされます。文字列は重複排除されます。 18148
* MatchData
* 新規メソッド
* MatchData#match が追加されました。 18172
* MatchData#match_length が追加されました。 18172
* Method / UnboundMethod
* 新規メソッ......には、ハッシュリテラルを使用する必要があります。 16806
* String
* Unicodeと絵文字のバージョンが13.0.0に更新されました。 17750 18029
* String#unpack と String#unpack1 が任意のバイト数をスキップした後にアンパックを開始す......eadline-ext 0.1.4
* reline 0.3.0
* resolv 0.2.1
* rinda 0.1.1
* ruby2_keywords 0.0.5
* securerandom 0.1.1
* set 1.0.2
* stringio 3.0.1
* strscan 3.0.1
* tempfile 0.1.2
* time 0.2.0
* timeout 0.2.0
* tmpdir 0.1.2
* un 0.2.0
* uri 0.11.0
* ya... -
irb (48.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...れます。
: help(*names)
: irb_help(*names)
RI から Ruby のドキュメントを参照します。
//emlist{
irb(main):001:0> help String#match
...
//}
names を指定しなかった場合は、RI を対話的なモードで起動します。メソッ
ド名などを入力する......ete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -> matchdata or nil
str.match(pattern, pos) -> matchdata or nil
...
//}
=== システム... -
Regexp (12.0)
-
正規表現のクラス。正規表現のリテラルはスラッシュで囲んだ形式 で記述します。
...]{
/^this is regexp/
//}
Regexp.new(string) を使って正規表現オブジェクトを動的に生成する
こともできます。
//emlist[][ruby]{
str = "this is regexp"
rp1 = Regexp.new("^this is regexp")
p rp1 =~ str # => 0
p Regexp.last_match[0] # => "this is regexp"
//}
spec......]{
/^this is regexp/
//}
Regexp.new(string) を使って正規表現オブジェクトを動的に生成する
こともできます。
//emlist[][ruby]{
str = "this is regexp"
rp1 = Regexp.new("^this is regexp")
p rp1 =~ str # => 0
p Regexp.last_match[0] # => "this is regexp"
//}
Ruby... -
クラス/メソッドの定義 (12.0)
-
クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined
...に指定しても同じ)
class Foo
def bar
end
end
# 間違ったスーパークラスを指定するとエラー
class Foo < String
end
# => superclass mismatch for class Foo (TypeError)
//}
クラス定義式の中は self がそのクラスであることと、
limitのデフォルトが......self._val + other._val
end
end
//}
=== 定義に関する操作
====[a:alias] alias
//emlist[例][ruby]{
alias foo bar
alias :foo :bar
alias $MATCH $&
//}
文法:
alias 新メソッド名 旧メソッド名
alias 新グローバル変数名 旧グローバル変数名...