From 20e2b5ca998ffc34e39492da94e47dd516cc9fdc Mon Sep 17 00:00:00 2001 From: Xavier Shay Date: Tue, 31 May 2011 19:57:28 +1000 Subject: [PATCH] A better way to provide backwards compatibility for enumerator.so --- enumerator.c | 2 -- lib/enumerator.rb | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 lib/enumerator.rb diff --git a/enumerator.c b/enumerator.c index 7bb5ecd0993668..b8ce6981a07304 100644 --- a/enumerator.c +++ b/enumerator.c @@ -1171,6 +1171,4 @@ Init_Enumerator(void) id_rewind = rb_intern("rewind"); id_each = rb_intern("each"); sym_each = ID2SYM(id_each); - - rb_provide("enumerator.so"); /* for backward compatibility */ } diff --git a/lib/enumerator.rb b/lib/enumerator.rb new file mode 100644 index 00000000000000..b028c83139c4b7 --- /dev/null +++ b/lib/enumerator.rb @@ -0,0 +1,3 @@ +# This class is now defined entirely in enumerator.c and is always available. +# This file needs to remain here for backwards compatibility, so that `require +# "enumerator"` will not raise an exception.