diff options
Diffstat (limited to 'math/ruby-gsl/patches/patch-ext_ool.c')
-rw-r--r-- | math/ruby-gsl/patches/patch-ext_ool.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/math/ruby-gsl/patches/patch-ext_ool.c b/math/ruby-gsl/patches/patch-ext_ool.c new file mode 100644 index 00000000000..71f7a176a52 --- /dev/null +++ b/math/ruby-gsl/patches/patch-ext_ool.c @@ -0,0 +1,18 @@ +$NetBSD: patch-ext_ool.c,v 1.1 2014/03/26 13:25:26 taca Exp $ + +Fix for Ruby 2.1. + +--- ext/ool.c.orig 2014-03-25 15:47:30.000000000 +0000 ++++ ext/ool.c +@@ -770,7 +770,11 @@ static VALUE rb_ool_conmin_pgrad_paramet + VALUE ary; + ool_conmin_parameters_default(ool_conmin_minimizer_pgrad, (void*) &P); + ary = create_parameters_ary_pgrad(&P); ++#if RUBY_API_VERSION_MAJOR >=2 && RUBY_API_VERSION_MINOR >= 1 ++ rb_obj_reveal(ary, cool_conmin_pgrad_parameters); ++#else + RBASIC(ary)->klass = cool_conmin_pgrad_parameters; ++#endif + return ary; + } + |