From fd8c8d09f41f9e83ed56efc8feaa1fe612ff90fc Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 9 Apr 2008 11:13:04 +0000 Subject: * enumerator.c, inits.c (rb_call_inits), ruby.h, intern.h, ext/enumerator, common.mk (OBJS, enumerator.$(OBJEXT)): Make the enumerator module built-in, * enumerator.c: New method: Enumerable::Enumerator#with_index. * enum.c (enum_each_with_index): Enumerable#each_with_index now returns an enumerator instead of raising an exception if no block is given. Enumerable#enum_with_index, formerly defined in the enumerator module, is kept as an alias to each_with_index for backward compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- common.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common.mk') diff --git a/common.mk b/common.mk index b7666d66a2..e398ee3d59 100644 --- a/common.mk +++ b/common.mk @@ -23,6 +23,7 @@ OBJS = array.$(OBJEXT) \ dir.$(OBJEXT) \ dln.$(OBJEXT) \ enum.$(OBJEXT) \ + enumerator.$(OBJEXT) \ error.$(OBJEXT) \ eval.$(OBJEXT) \ file.$(OBJEXT) \ @@ -370,6 +371,8 @@ dmyext.$(OBJEXT): {$(VPATH)}dmyext.c enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}node.h {$(VPATH)}util.h +enumerator.$(OBJEXT): {$(VPATH)}enumerator.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}env.h {$(VPATH)}st.h -- cgit v1.2.3