summaryrefslogtreecommitdiffhomepage
path: root/tasks/ruby_ext.rake
diff options
context:
space:
mode:
authorcremno <[email protected]>2014-08-04 05:50:05 +0200
committercremno <[email protected]>2014-08-04 05:50:05 +0200
commit6526bb10f0c60f6f1d17f873214243ca7ec1730a (patch)
tree064358c95101ab7ee8426a037e76b90bddff4f59 /tasks/ruby_ext.rake
parent0fa3668e917c45409acd56ba624db24d95699895 (diff)
downloadmruby-6526bb10f0c60f6f1d17f873214243ca7ec1730a.tar.gz
mruby-6526bb10f0c60f6f1d17f873214243ca7ec1730a.zip
don't always generate gem functions
If the src and mrblib directories of a mrbgem don't exist or don't include "usable" files (for tools like mirb), then functions for gem initialization and finalization don't have to be generated.
Diffstat (limited to 'tasks/ruby_ext.rake')
-rw-r--r--tasks/ruby_ext.rake9
1 files changed, 9 insertions, 0 deletions
diff --git a/tasks/ruby_ext.rake b/tasks/ruby_ext.rake
index 38dfff0a3..61fa91d97 100644
--- a/tasks/ruby_ext.rake
+++ b/tasks/ruby_ext.rake
@@ -42,6 +42,15 @@ class Symbol
end
end
+module Enumerable
+ # Compatible with 1.9 on 1.8
+ def each_with_object(memo)
+ return to_enum :each_with_object, memo unless block_given?
+ each { |obj| yield obj, memo }
+ memo
+ end
+end
+
$pp_show = true
if $verbose.nil?