summaryrefslogtreecommitdiff
path: root/ext/strscan
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-04 10:40:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-04 10:40:09 +0000
commit49af08e1887326f74cabef7b92dfd814ad7c144b (patch)
tree5f134575dacfe1e2bdfaadd88df29448c96038f5 /ext/strscan
parent0992f6c4728112c50520e7506f4e75e1cac62206 (diff)
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#do_includes): replace
also locally defined modules. * ext/iconv/iconv.c: rdocified. * ext/strscan/strscan.c: moved misplaced rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan')
-rw-r--r--ext/strscan/strscan.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index bdd9680367..0775de1fda 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -303,7 +303,8 @@ strscan_terminate(self)
}
/*
- * Returns the string being scanned.
+ * Equivalent to #terminate.
+ * This method is obsolete; use #terminate instead.
*/
static VALUE
strscan_clear(self)
@@ -313,6 +314,9 @@ strscan_clear(self)
return strscan_terminate(self);
}
+/*
+ * Returns the string being scanned.
+ */
static VALUE
strscan_get_string(self)
VALUE self;
@@ -744,6 +748,10 @@ strscan_get_byte(self)
p->prev + p->regs.end[0]);
}
+/*
+ * Equivalent to #get_byte.
+ * This method is obsolete; use #get_byte instead.
+ */
static VALUE
strscan_getbyte(self)
VALUE self;
@@ -782,6 +790,18 @@ strscan_peek(self, vlen)
}
/*
+ * Equivalent to #peek.
+ * This method is obsolete; use #peek instead.
+ */
+static VALUE
+strscan_peep(self, vlen)
+ VALUE self, vlen;
+{
+ rb_warning("StringScanner#peep is obsolete; use #peek instead");
+ return strscan_peek(self, vlen);
+}
+
+/*
* Set the scan pointer to the previous position. Only one previous position is
* remembered, and it changes with each scanning operation.
*
@@ -793,14 +813,6 @@ strscan_peek(self, vlen)
* s.unscan # ScanError: can't unscan: prev match had failed
*/
static VALUE
-strscan_peep(self, vlen)
- VALUE self, vlen;
-{
- rb_warning("StringScanner#peep is obsolete; use #peek instead");
- return strscan_peek(self, vlen);
-}
-
-static VALUE
strscan_unscan(self)
VALUE self;
{