diff --git a/README.md b/README.md index 61ae64c..ef89ebf 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ In rf, you can use [special variables](https://docs.ruby-lang.org/ja/latest/clas |-------|------| | \_ | The input chunk | | $\_ | Alias for \_ | -| $F | Alias for \_ | +| $F | It is an array that stores fields(`$F=_.split`) | | \_1, \_2, \_3, ... | First field, second field, third field... | ## Built-in methods diff --git a/README_ja.md b/README_ja.md index a9aa480..1d454b3 100644 --- a/README_ja.md +++ b/README_ja.md @@ -182,7 +182,7 @@ rfではRubyで定義されている[特殊変数](https://docs.ruby-lang.org/ja |-------|------| | \_ | 入力されたチャンクです | | $\_ | \_ のエイリアスです | -| $F | \_ のエイリアスです | +| $F | フィールドを格納した配列です(`$F=_.split`) | | \_1, \_2, \_3, ... | 1番目、2番目、3番目のフィールドです | ## 組み込みメソッド diff --git a/mrblib/rf/container.rb b/mrblib/rf/container.rb index 846505e..84f6eab 100644 --- a/mrblib/rf/container.rb +++ b/mrblib/rf/container.rb @@ -5,7 +5,8 @@ def _ end def _=(data) - $F = $_ = data + $F = data.split + $_ = data end def string?