2件ヒット
[1-2件を表示]
(0.116秒)
種類
- 特異メソッド (1)
- インスタンスメソッド (1)
ライブラリ
- ビルトイン (1)
-
fiddle
/ import (1)
クラス
- Regexp (1)
モジュール
-
Fiddle
:: Importer (1)
検索結果
-
Regexp
. union(*pattern) -> Regexp (82546.0) -
引数として与えた pattern を選択 | で連結し、Regexp として返します。 結果の Regexp は与えた pattern のどれかにマッチする場合にマッチするものになります。
引数として与えた pattern を選択 | で連結し、Regexp として返します。
結果の Regexp は与えた pattern のどれかにマッチする場合にマッチするものになります。
//emlist[][ruby]{
p Regexp.union(/a/, /b/, /c/) # => /(?-mix:a)|(?-mix:b)|(?-mix:c)/
//}
引数を一つだけ与える場合は、Array を与えても Regexp を生成します。
つまり、以下のように書くことができます。
//emlist[][ruby]{
arr = [/a/, /b/, /c/]
p Regexp.u... -
Fiddle
:: Importer # union(signature) -> Class (82240.0) -
C の共用体型に対応する Ruby のクラスを構築して返します。
C の共用体型に対応する Ruby のクラスを構築して返します。
共用体型を Ruby 上で定義する方法は Fiddle::Importer#struct と
ほぼ同様です。C における
typedef union epoll_data
{
void *ptr;
int fd;
uint32_t u32;
uint64_t u64;
} epoll_data_t;
は、Ruby上では
require 'fiddle/import'
module M
extend Fiddle::Importer
dlload "lib...