Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

MakeMakefile#egrep_cpp

egrep_cpp(pat, src, opt = "", &b)

Returns whether or not the src can be preprocessed with the C preprocessor and matches with pat.

If a block given, it is called with the source before compilation. You can modify the source in the block.

pat

a Regexp or a String

src

a String which contains a C source

opt

a String which contains preprocessor options

NOTE: When pat is a Regexp the matching will be checked in process, otherwise egrep(1) will be invoked to check it.