From 253ce4b7c1f56b41f584eee66455bf961acbd221 Mon Sep 17 00:00:00 2001 From: Jonathan Worthington Date: Sat, 6 Feb 2010 17:40:42 +0100 Subject: [PATCH] Cheat for Match.Bool. --- build/Makefile.in | 1 + src/cheats/match-bool.pm | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 src/cheats/match-bool.pm diff --git a/build/Makefile.in b/build/Makefile.in index c581a2e4603..1f1f06703b1 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -180,6 +180,7 @@ CORE_SOURCES = \ src/core/IO.pm \ src/core/Parameter.pm \ src/core/Block.pm \ + src/cheats/match-bool.pm \ src/cheats/setup-io.pm \ # SETTING = \ diff --git a/src/cheats/match-bool.pm b/src/cheats/match-bool.pm new file mode 100644 index 00000000000..25d279a5454 --- /dev/null +++ b/src/cheats/match-bool.pm @@ -0,0 +1,5 @@ +INIT { + Regex::Match.^add_method('Bool', method () { + self.to >= self.from + }); +}