aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/ruby-amatch
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2005-11-30 18:23:56 +0800
committervs <vs@FreeBSD.org>2005-11-30 18:23:56 +0800
commitf24f4e09ba188dd289f5c015a46f0867b996e7c1 (patch)
tree28677394912eaf50b7bfdec0025de669ee718bf4 /textproc/ruby-amatch
parent0c69688ac40e86697fa5a35c8a907d04f4f9ed0c (diff)
downloadfreebsd-ports-gnome-f24f4e09ba188dd289f5c015a46f0867b996e7c1.tar.gz
freebsd-ports-gnome-f24f4e09ba188dd289f5c015a46f0867b996e7c1.tar.zst
freebsd-ports-gnome-f24f4e09ba188dd289f5c015a46f0867b996e7c1.zip
Add file forgotten in previous commit:
- Fix build on 4.x
Diffstat (limited to 'textproc/ruby-amatch')
-rw-r--r--textproc/ruby-amatch/files/patch-ext_amatch.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/textproc/ruby-amatch/files/patch-ext_amatch.c b/textproc/ruby-amatch/files/patch-ext_amatch.c
new file mode 100644
index 000000000000..3c6d3e780228
--- /dev/null
+++ b/textproc/ruby-amatch/files/patch-ext_amatch.c
@@ -0,0 +1,28 @@
+
+$FreeBSD$
+
+--- ext/amatch.c.orig
++++ ext/amatch.c
+@@ -86,9 +86,10 @@
+ if (TYPE(strings) == T_STRING) { \
+ return match_function(amatch, strings); \
+ } else { \
+- Check_Type(strings, T_ARRAY); \
+ int i; \
+- VALUE result = rb_ary_new2(RARRAY(strings)->len); \
++ VALUE result; \
++ Check_Type(strings, T_ARRAY); \
++ result = rb_ary_new2(RARRAY(strings)->len); \
+ for (i = 0; i < RARRAY(strings)->len; i++) { \
+ VALUE string = rb_ary_entry(strings, i); \
+ if (TYPE(string) != T_STRING) { \
+@@ -949,8 +950,8 @@
+ if (TYPE(strings) == T_STRING) {
+ result = PairDistance_match(amatch, strings, regexp, use_regexp);
+ } else {
+- Check_Type(strings, T_ARRAY);
+ int i;
++ Check_Type(strings, T_ARRAY);
+ result = rb_ary_new2(RARRAY(strings)->len);
+ for (i = 0; i < RARRAY(strings)->len; i++) {
+ VALUE string = rb_ary_entry(strings, i);