forked from mruby/mruby
-
Notifications
You must be signed in to change notification settings - Fork 4
Regexp specification
kouki-o-iij edited this page Mar 6, 2013
·
22 revisions
CRuby 2.0.0: http://doc.ruby-lang.org/ja/2.0.0/class/Regexp.html
| Feature | iij/mruby | Memo |
|---|---|---|
| i = in ISO Ruby, t = have a test | ||
| Option i, m | o | i,t |
| Option x | o | t |
| Option o | x | |
| .compile .new | o | i,t |
| .escape .quote | o | i,t |
| .last_match | o | i,t, ローカルスコープが難しい? |
| .try_convert | x | |
| .union | x | |
| #== #eql? | o | i,t |
| #=== | o | i,t |
| #=~ | o | i,t |
| #casefold? | o | i,t |
| #encoding | x | 後回し |
| #fixed_encoding? | x | 後回し |
| #hash | x | |
| #inspect | o | テストを足すと abort |
| #match | o | i,t |
| #named_captures | x | |
| #names | x | |
| #options | o | t? |
| #source | o | i |
| #to_s | o | |
| #~ | x |
| Method | iij/mruby | Memo |
|---|---|---|
| #[] | o | i |
| #begin | o | i |
| #captures | o | i |
| #end | o | i |
| #length #size | o | i |
| #names | x | .regexp.names で実装できる |
| #offset | o | i |
| #post_match | o | i |
| #pre_match | o | i |
| #regexp | x | easy |
| #string | o | i |
| #to_a | o | i |
| #to_s | o | i |
| #values_at | x | #[] から容易に実装できる |
| Method | iij/mruby | Memo |
|---|---|---|
| #[re] #slice #slice! | o | i |
| #gsub #gsub! | o | i |
| #index | o | |
| #match | o | i |
| #rindex | o | |
| #scan | o | i,t |
| #split | o | i,t |
| #sub #sub! | o | i,t |
| Feature | iij/mruby | Memo |
|---|---|---|
| /literal/ | o | i |
| /#{str}/ | ? | |
| $1 $2 ... | ? | |
| $~ | ? | i |
|
|
? |