aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 15:18:50 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 15:18:50 +0000
commit33c88c943b9832154d1da8f8b21c33a8fc59fc0a (patch)
tree988295914fd4e93cf415ec614a9f0a9923e71299 /internal.h
parentb2545b033da67193211b0e3073cc928eab1d4428 (diff)
downloadruby-33c88c943b9832154d1da8f8b21c33a8fc59fc0a.tar.gz
Introduce endless range [Feature#12912]
Typical usages: ``` p ary[1..] # drop the first element; identical to ary[1..-1] (1..).each {|n|...} # iterate forever from 1; identical to 1.step{...} ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal.h b/internal.h
index cc5f4b7e99..ae5fef437a 100644
--- a/internal.h
+++ b/internal.h
@@ -1404,7 +1404,7 @@ enum ruby_num_rounding_mode {
int rb_num_to_uint(VALUE val, unsigned int *ret);
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
-int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl);
+int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
double ruby_float_mod(double x, double y);
int rb_num_negative_p(VALUE);
VALUE rb_int_succ(VALUE num);
@@ -2013,6 +2013,7 @@ VALUE rb_gcd_gmp(VALUE x, VALUE y);
/* internal use */
VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc);
#endif
+VALUE rb_str_upto_endless_each(VALUE, VALUE (*each)(), VALUE);
/* thread.c (export) */
int ruby_thread_has_gvl_p(void); /* for ext/fiddle/closure.c */