Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
range.c File Reference
`#include "ruby/ruby.h"`
`#include "ruby/encoding.h"`
`#include "internal.h"`
`#include "id.h"`
`#include <math.h>`
Include dependency graph for range.c:

Go to the source code of this file.

## Macros
#define | RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
#define | RANGE_END(r) (RSTRUCT(r)->as.ary[1])
#define | RANGE_EXCL(r) (RSTRUCT(r)->as.ary[2])
#define | EXCL(r) RTEST(RANGE_EXCL(r))
#define | SET_EXCL(r, v) (RSTRUCT(r)->as.ary[2] = (v) ? Qtrue : Qfalse)
#define | range_initialize_copy rb_struct_init_copy /* :nodoc: */
#define | BSEARCH_CHECK(val)
#define | BSEARCH(conv)
#define | rb_intern(str) rb_intern_const(str)

## Functions
static VALUE | range_failed (void)
static VALUE | range_check (VALUE *args)
static void | range_init (VALUE range, VALUE beg, VALUE end, int exclude_end)
VALUE | rb_range_new (VALUE beg, VALUE end, int exclude_end)
static VALUE | range_initialize (int argc, VALUE *argv, VALUE range)
static VALUE | range_exclude_end_p (VALUE range)
static VALUE | recursive_equal (VALUE range, VALUE obj, int recur)
static VALUE | range_eq (VALUE range, VALUE obj)
static int | r_lt (VALUE a, VALUE b)
static int | r_le (VALUE a, VALUE b)
static VALUE | recursive_eql (VALUE range, VALUE obj, int recur)
static VALUE | range_eql (VALUE range, VALUE obj)
static VALUE | recursive_hash (VALUE range, VALUE dummy, int recur)
static VALUE | range_hash (VALUE range)
static void | range_each_func (VALUE range, VALUE(*func)(VALUE, void *), void *arg)
static VALUE | sym_step_i (VALUE i, void *arg)
static VALUE | step_i (VALUE i, void *arg)
static int | discrete_object_p (VALUE obj)
static VALUE | range_step_size (VALUE range, VALUE args)
static VALUE | range_step (int argc, VALUE *argv, VALUE range)
static int | is_integer_p (VALUE v)
static VALUE | range_bsearch (VALUE range)
static VALUE | each_i (VALUE v, void *arg)
static VALUE | sym_each_i (VALUE v, void *arg)
static VALUE | range_size (VALUE range)
static VALUE | range_each (VALUE range)
static VALUE | range_begin (VALUE range)
static VALUE | range_end (VALUE range)
static VALUE | first_i (VALUE i, VALUE *ary)
static VALUE | range_first (int argc, VALUE *argv, VALUE range)
static VALUE | range_last (int argc, VALUE *argv, VALUE range)
static VALUE | range_min (VALUE range)
static VALUE | range_max (VALUE range)
int | rb_range_values (VALUE range, VALUE *begp, VALUE *endp, int *exclp)
VALUE | rb_range_beg_len (VALUE range, long *begp, long *lenp, long len, int err)
static VALUE | range_to_s (VALUE range)
static VALUE | inspect_range (VALUE range, VALUE dummy, int recur)
static VALUE | range_inspect (VALUE range)
static VALUE | range_eqq (VALUE range, VALUE val)
static VALUE | range_include (VALUE range, VALUE val)
static VALUE | range_cover (VALUE range, VALUE val)
static VALUE | range_dumper (VALUE range)
static VALUE | range_loader (VALUE range, VALUE obj)
static VALUE | range_alloc (VALUE klass)
void | Init_Range (void)

## Variables
VALUE | rb_cRange
static ID | id_cmp
static ID | id_succ
static ID | id_beg
static ID | id_end
static ID | id_excl
static ID | id_integer_p
static ID | id_div

## Macro Definition Documentation

#define BSEARCH | ( |  | conv | ) |

Value:
do { \
RETURN_ENUMERATOR(range, 0, 0); \
if (EXCL(range)) high--; \
org_high = high; \
while (low < high) { \
mid = ((high < 0) == (low < 0)) ? low + ((high - low) / 2) \
: (low < -high) ? -((-1 - low - high)/2 + 1) : (low + high) / 2; \
BSEARCH_CHECK(conv(mid)); \
if (smaller) { \
high = mid; \
} \
else { \
low = mid + 1; \
} \
} \
if (low == org_high) { \
BSEARCH_CHECK(conv(low)); \
if (!smaller) return Qnil; \
} \
if (!satisfied) return Qnil; \
return conv(low); \
} while (0)
return
return
Definition: bigdecimal.c:5800
RETURN_ENUMERATOR
#define RETURN_ENUMERATOR(obj, argc, argv)
EXCL
#define EXCL(r)
Definition: range.c:29
while
while(a->frac[0]/shift==0)
Definition: bigdecimal.c:5117
Qnil
#define Qnil
Definition: tcltklib.c:1896
range
#define range(low, item, hi)
Definition: date_strftime.c:21
BSEARCH_CHECK
#define BSEARCH_CHECK(val)
else
else
Definition: bigdecimal.c:1192
if
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186

Referenced by range_bsearch().

#define BSEARCH_CHECK | ( |  | val | ) |

Value:
do { \
VALUE v = rb_yield(val); \
if (FIXNUM_P(v)) { \
if (FIX2INT(v) == 0) return val; \
smaller = FIX2INT(v) < 0; \
} \
else if (v == Qtrue) { \
satisfied = 1; \
smaller = 1; \
} \
else if (v == Qfalse || v == Qnil) { \
smaller = 0; \
} \
else if (rb_obj_is_kind_of(v, rb_cNumeric)) { \
int cmp = rb_cmpint(rb_funcall(v, id_cmp, 1, INT2FIX(0)), v, INT2FIX(0)); \
if (!cmp) return val; \
smaller = cmp < 0; \
} \
else { \
rb_raise(rb_eTypeError, "wrong argument type %s" \
" (must be numeric, true, false or nil)", \
rb_obj_classname(v)); \
} \
} while (0)
int
VP_EXPORT int
Definition: bigdecimal.c:5050
rb_obj_classname
const char * rb_obj_classname(VALUE)
Definition: variable.c:396
return
return
Definition: bigdecimal.c:5800
rb_eTypeError
VALUE rb_eTypeError
Definition: error.c:511
rb_funcall
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
Definition: vm_eval.c:774
rb_raise
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:1780
Qtrue
return Qtrue
Definition: tcltklib.c:9610
rb_cmpint
int rb_cmpint(VALUE val, VALUE a, VALUE b)
Definition: bignum.c:97
Qfalse
return Qfalse
Definition: tcltklib.c:6779
FIXNUM_P
#define FIXNUM_P(f)
Qnil
#define Qnil
Definition: tcltklib.c:1896
val
#define val
Definition: tcltklib.c:1949
FIX2INT
#define FIX2INT(x)
INT2FIX
#define INT2FIX(i)
id_cmp
static ID id_cmp
Definition: range.c:23
rb_yield
VALUE rb_yield(VALUE)
Definition: vm_eval.c:934
else
else
Definition: bigdecimal.c:1192
rb_obj_is_kind_of
VALUE rb_obj_is_kind_of(VALUE, VALUE)
Definition: object.c:582
if
if(RB_TYPE_P(r, T_FLOAT))
Definition: bigdecimal.c:1186
VALUE
unsigned long VALUE
Definition: ripper.y:104
v
BDIGIT v
Definition: bigdecimal.c:5656
rb_cNumeric
RUBY_EXTERN VALUE rb_cNumeric
Definition: ripper.y:1448
cmp
static ID cmp
Definition: compar.c:16

Referenced by range_bsearch().

#define EXCL | ( |  | r | ) | RTEST(RANGE_EXCL(r))

Definition at line 29 of file range.c.

Referenced by inspect_range(), range_bsearch(), range_cover(), range_each(), range_each_func(), range_exclude_end_p(), range_include(), range_max(), range_min(), range_size(), range_step(), range_step_size(), range_to_s(), rb_range_values(), recursive_eql(), recursive_equal(), and recursive_hash().

#define RANGE_BEG | ( |  | r | ) | (RSTRUCT(r)->as.ary[0])

Definition at line 25 of file range.c.

Referenced by inspect_range(), range_begin(), range_bsearch(), range_cover(), range_dumper(), range_each(), range_each_func(), range_first(), range_include(), range_max(), range_min(), range_size(), range_step(), range_step_size(), range_to_s(), rb_range_values(), recursive_eql(), recursive_equal(), and recursive_hash().

#define RANGE_END | ( |  | r | ) | (RSTRUCT(r)->as.ary[1])

Definition at line 26 of file range.c.

Referenced by inspect_range(), range_bsearch(), range_cover(), range_dumper(), range_each(), range_each_func(), range_end(), range_include(), range_last(), range_max(), range_min(), range_size(), range_step(), range_step_size(), range_to_s(), rb_range_values(), recursive_eql(), recursive_equal(), and recursive_hash().

#define RANGE_EXCL | ( |  | r | ) | (RSTRUCT(r)->as.ary[2])

Definition at line 27 of file range.c.

Referenced by range_dumper(), and range_initialize().

#define range_initialize_copy rb_struct_init_copy /* :nodoc: */

Definition at line 98 of file range.c.

Referenced by Init_Range().

#define rb_intern | ( |  | str | ) | rb_intern_const(str)

#define SET_EXCL | ( |  | r,
|  |  | v
| ) |  | (RSTRUCT(r)->as.ary[2] = (v) ? Qtrue : Qfalse)

Definition at line 30 of file range.c.

Referenced by range_init().

## Function Documentation

static int discrete_object_p | ( | VALUE | obj | ) |
| static

Definition at line 318 of file range.c.

References FALSE, id_succ, rb_cTime, rb_obj_is_kind_of(), and rb_respond_to().

Referenced by range_each(), and range_step().

static VALUE each_i | ( | VALUE | v,
|  | void * | arg
| ) |  |
| static

Definition at line 682 of file range.c.

References Qnil, and rb_yield().

Referenced by range_each().

static VALUE first_i | ( | VALUE | i,
|  | VALUE * | ary
| ) |  |
| static

Definition at line 818 of file range.c.

References INT2NUM, n, NUM2LONG, Qnil, rb_ary_push(), and rb_iter_break().

Referenced by range_first().

void Init_Range | ( | void |  | ) |

Definition at line 1303 of file range.c.

References id_beg, id_cmp, id_div, id_end, id_excl, id_integer_p, id_succ, NULL, range_alloc(), range_begin(), range_bsearch(), range_cover(), range_dumper(), range_each(), range_end(), range_eq(), range_eql(), range_eqq(), range_exclude_end_p(), range_first(), range_hash(), range_include(), range_initialize(), range_initialize_copy, range_inspect(), range_last(), range_loader(), range_max(), range_min(), range_size(), range_step(), range_to_s(), rb_cObject, rb_cRange, rb_define_method(), rb_include_module(), rb_intern, rb_marshal_define_compat(), rb_mEnumerable, and rb_struct_define_without_accessor().

static VALUE inspect_range | ( | VALUE | range,
|  | VALUE | dummy,
|  | int | recur
| ) |  |
| static

Definition at line 1054 of file range.c.

References EXCL, OBJ_INFECT, RANGE_BEG, RANGE_END, rb_inspect(), rb_str_append(), rb_str_cat(), rb_str_dup(), rb_str_new2, and str.

Referenced by range_inspect().

static int is_integer_p | ( | VALUE | v | ) |
| static

Definition at line 504 of file range.c.

References id_integer_p, Qundef, rb_check_funcall(), and RTEST.

Referenced by range_bsearch().

static int r_le | ( | VALUE | a,
|  | VALUE | b
| ) |  |
| static

Definition at line 169 of file range.c.

References c, id_cmp, INT2FIX, NIL_P(), Qfalse, Qtrue, r, rb_cmpint(), and rb_funcall().

Referenced by range_cover(), range_each_func(), and range_include().

static int r_lt | ( | VALUE | a,
|  | VALUE | b
| ) |  |
| static

Definition at line 157 of file range.c.

References id_cmp, NIL_P(), Qfalse, Qtrue, r, rb_cmpint(), and rb_funcall().

Referenced by range_cover(), range_each_func(), and range_include().

static VALUE range_alloc | ( | VALUE | klass | ) |
| static

Definition at line 1238 of file range.c.

References rb_struct_alloc_noinit().

Referenced by Init_Range().

static VALUE range_begin | ( | VALUE | range | ) |
| static

Definition at line 793 of file range.c.

References RANGE_BEG.

Referenced by Init_Range().

static VALUE range_bsearch | ( | VALUE | range | ) |
| static

Definition at line 563 of file range.c.

References BSEARCH, BSEARCH_CHECK, end, EXCL, FIX2LONG, FIXNUM_P, id_cmp, id_div, INT2FIX, is_integer_p(), Qnil, range, RANGE_BEG, RANGE_END, rb_cmpint(), rb_equal(), rb_eTypeError, rb_Float(), rb_funcall(), rb_obj_classname(), rb_raise(), rb_to_int(), RB_TYPE_P, RETURN_ENUMERATOR, RFLOAT_VALUE, and T_FLOAT.

Referenced by Init_Range().

static VALUE range_check | ( | VALUE * | args | ) |
| static

Definition at line 40 of file range.c.

References id_cmp, and rb_funcall().

Referenced by range_init().

static VALUE range_cover | ( | VALUE | range,
|  | VALUE | val
| ) |  |
| static

Definition at line 1191 of file range.c.

References end, EXCL, Qfalse, Qtrue, r_le(), r_lt(), RANGE_BEG, and RANGE_END.

Referenced by Init_Range().

static VALUE range_dumper | ( | VALUE | range | ) |
| static

Definition at line 1211 of file range.c.

References id_beg, id_end, id_excl, m, NEWOBJ_OF, RANGE_BEG, RANGE_END, RANGE_EXCL, rb_cObject, rb_ivar_set(), T_OBJECT, and v.

Referenced by Init_Range().

static VALUE range_each | ( | VALUE | range | ) |
| static

Definition at line 736 of file range.c.

References args, discrete_object_p(), each_i(), end, EXCL, FIX2LONG, FIXNUM_P, i, LONG2FIX, NIL_P(), NULL, Qfalse, Qtrue, range, RANGE_BEG, range_each_func(), RANGE_END, range_size(), rb_block_call(), rb_check_string_type(), rb_eTypeError, rb_intern, rb_obj_classname(), rb_raise(), rb_sym_to_s(), rb_yield(), RETURN_SIZED_ENUMERATOR, sym_each_i(), SYMBOL_P, and tmp.

Referenced by Init_Range().

static void range_each_func | ( | VALUE | range,
|  | VALUE(*)(VALUE, void *) | func,
|  | void * | arg
| ) |  |
| static

Definition at line 258 of file range.c.

References arg, b, c, e, EXCL, id_succ, INT2FIX, Qfalse, r_le(), r_lt(), RANGE_BEG, RANGE_END, rb_funcall(), and v.

Referenced by range_each(), and range_step().

static VALUE range_end | ( | VALUE | range | ) |
| static

Definition at line 811 of file range.c.

References RANGE_END.

Referenced by Init_Range().

static VALUE range_eq | ( | VALUE | range,
|  | VALUE | obj
| ) |  |
| static

Definition at line 146 of file range.c.

References Qfalse, Qtrue, rb_cRange, rb_exec_recursive_paired(), rb_obj_is_kind_of(), and recursive_equal().

Referenced by Init_Range().

static VALUE range_eql | ( | VALUE | range,
|  | VALUE | obj
| ) |  |
| static

Definition at line 214 of file range.c.

References Qfalse, Qtrue, rb_cRange, rb_exec_recursive_paired(), rb_obj_is_kind_of(), and recursive_eql().

Referenced by Init_Range().

static VALUE range_eqq | ( | VALUE | range,
|  | VALUE | val
| ) |  |
| static

Definition at line 1107 of file range.c.

References rb_funcall(), and rb_intern.

Referenced by Init_Range().

static VALUE range_exclude_end_p | ( | VALUE | range | ) |
| static

Definition at line 111 of file range.c.

References EXCL, Qfalse, and Qtrue.

Referenced by Init_Range().

static VALUE range_failed | ( | void |  | ) |
| static

Definition at line 33 of file range.c.

References Qnil, rb_eArgError, and rb_raise().

Referenced by range_init().

static VALUE range_first | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | range
| ) |  |
| static

Definition at line 844 of file range.c.

References ary, first_i(), n, NUM2LONG, RANGE_BEG, rb_ary_new2(), rb_block_call(), and rb_scan_args().

Referenced by Init_Range().

static VALUE range_hash | ( | VALUE | range | ) |
| static

Definition at line 252 of file range.c.

References rb_exec_recursive_outer(), and recursive_hash().

Referenced by Init_Range().

static VALUE range_include | ( | VALUE | range,
|  | VALUE | val
| ) |  |
| static

Definition at line 1128 of file range.c.

References b, e, end, EXCL, FIXNUM_P, ISASCII, NIL_P(), Qfalse, Qtrue, r_le(), r_lt(), RANGE_BEG, RANGE_END, rb_call_super(), rb_check_to_integer(), rb_cNumeric, rb_obj_is_kind_of(), RB_TYPE_P, RSTRING_LEN, RSTRING_PTR, T_STRING, and v.

Referenced by Init_Range().

static void range_init | ( | VALUE | range,
|  | VALUE | beg,
|  | VALUE | end,
|  | int | exclude_end
| ) |  |
| static

Definition at line 46 of file range.c.

References args, end, FIXNUM_P, NIL_P(), range_check(), range_failed(), rb_rescue(), RSTRUCT, SET_EXCL, and v.

Referenced by range_initialize(), and rb_range_new().

static VALUE range_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | range
| ) |  |
| static

Definition at line 85 of file range.c.

References end, flags, Qnil, RANGE_EXCL, range_init(), rb_name_error(), rb_scan_args(), and RTEST.

Referenced by Init_Range().

static VALUE range_inspect | ( | VALUE | range | ) |
| static

Definition at line 1082 of file range.c.

References inspect_range(), and rb_exec_recursive().

Referenced by Init_Range().

static VALUE range_last | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | range
| ) |  |
| static

Definition at line 877 of file range.c.

References RANGE_END, rb_Array(), and rb_ary_last().

Referenced by Init_Range().

static VALUE range_loader | ( | VALUE | range,
|  | VALUE | obj
| ) |  |
| static

Definition at line 1225 of file range.c.

References id_beg, id_end, id_excl, klass, range, rb_cObject, rb_eTypeError, rb_ivar_get(), rb_raise(), RB_TYPE_P, RBASIC, RSTRUCT, and T_OBJECT.

Referenced by Init_Range().

static VALUE range_max | ( | VALUE | range | ) |
| static

Definition at line 931 of file range.c.

References b, c, e, EXCL, FIX2LONG, FIXNUM_P, id_cmp, INT2FIX, LONG2NUM, Qnil, RANGE_BEG, RANGE_END, rb_block_given_p(), rb_call_super(), rb_cInteger, rb_cmpint(), rb_cNumeric, rb_eTypeError, rb_funcall(), rb_obj_is_kind_of(), and rb_raise().

Referenced by Init_Range().

static VALUE range_min | ( | VALUE | range | ) |
| static

Definition at line 900 of file range.c.

References b, c, e, EXCL, id_cmp, Qnil, RANGE_BEG, RANGE_END, rb_block_given_p(), rb_call_super(), rb_cmpint(), and rb_funcall().

Referenced by Init_Range().

static VALUE range_size | ( | VALUE | range | ) |
| static

Definition at line 705 of file range.c.

References b, e, EXCL, INT2FIX, num_interval_step_size(), Qnil, RANGE_BEG, RANGE_END, rb_cNumeric, and rb_obj_is_kind_of().

Referenced by Init_Range(), and range_each().

static VALUE range_step | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | range
| ) |  |
| static

Definition at line 383 of file range.c.

References args, b, discrete_object_p(), e, end, EXCL, FIX2LONG, FIXNUM_P, i, idLE, INT2FIX, INT2NUM, LONG2NUM, NIL_P(), Qfalse, Qtrue, range, RANGE_BEG, range_each_func(), RANGE_END, range_step_size(), rb_block_call(), rb_check_string_type(), rb_check_to_integer(), rb_cNumeric, rb_eArgError, rb_eTypeError, rb_funcall(), rb_intern, rb_obj_classname(), rb_obj_is_kind_of(), rb_raise(), rb_scan_args(), rb_sym_to_s(), rb_to_int(), rb_yield(), RETURN_SIZED_ENUMERATOR, RTEST, ruby_float_step(), step_i(), sym_step_i(), SYMBOL_P, tmp, and v.

Referenced by Init_Range().

static VALUE range_step_size | ( | VALUE | range,
|  | VALUE | args
| ) |  |
| static

Definition at line 325 of file range.c.

References b, e, EXCL, INT2FIX, num_interval_step_size(), Qnil, RANGE_BEG, RANGE_END, RARRAY_PTR(), rb_cNumeric, rb_eArgError, rb_funcall(), rb_obj_is_kind_of(), rb_raise(), and rb_to_int().

Referenced by range_step().

static VALUE range_to_s | ( | VALUE | range | ) |
| static

Definition at line 1039 of file range.c.

References EXCL, OBJ_INFECT, RANGE_BEG, RANGE_END, rb_obj_as_string(), rb_str_append(), rb_str_cat(), rb_str_dup(), and str.

Referenced by Init_Range().

VALUE rb_range_beg_len | ( | VALUE | range,
|  | long * | begp,
|  | long * | lenp,
|  | long | len,
|  | int | err
| ) |  |

Definition at line 987 of file range.c.

References b, e, end, len, NUM2LONG, Qfalse, Qnil, Qtrue, rb_eRangeError, rb_raise(), and rb_range_values().

Referenced by rb_ary_aref(), rb_ary_aset(), rb_ary_fill(), rb_ary_slice_bang(), rb_get_values_at(), rb_str_aref(), rb_str_aset(), str_byte_aref(), and vm_backtrace_to_ary().

VALUE rb_range_new | ( | VALUE | beg,
|  | VALUE | end,
|  | int | exclude_end
| ) |  |

Definition at line 67 of file range.c.

References range, range_init(), rb_cRange, and rb_obj_alloc().

Referenced by fixup_nodes().

int rb_range_values | ( | VALUE | range,
|  | VALUE * | begp,
|  | VALUE * | endp,
|  | int * | exclp
| ) |  |

Definition at line 963 of file range.c.

References b, e, EXCL, id_beg, id_end, Qfalse, Qtrue, RANGE_BEG, RANGE_END, rb_cRange, rb_funcall(), rb_intern, rb_obj_is_kind_of(), rb_respond_to(), and RTEST.

Referenced by range_values(), and rb_range_beg_len().

static VALUE recursive_eql | ( | VALUE | range,
|  | VALUE | obj,
|  | int | recur
| ) |  |
| static

Definition at line 186 of file range.c.

References EXCL, Qfalse, Qtrue, RANGE_BEG, RANGE_END, and rb_eql().

Referenced by range_eql().

static VALUE recursive_equal | ( | VALUE | range,
|  | VALUE | obj,
|  | int | recur
| ) |  |
| static

Definition at line 117 of file range.c.

References EXCL, Qfalse, Qtrue, RANGE_BEG, RANGE_END, and rb_equal().

Referenced by range_eq().

static VALUE recursive_hash | ( | VALUE | range,
|  | VALUE | dummy,
|  | int | recur
| ) |  |
| static

Definition at line 224 of file range.c.

References EXCL, hash, LONG2FIX, NUM2LONG, RANGE_BEG, RANGE_END, rb_hash(), rb_hash_end, rb_hash_start(), rb_hash_uint, and v.

Referenced by range_hash().

static VALUE step_i | ( | VALUE | i,
|  | void * | arg
| ) |  |
| static

Definition at line 300 of file range.c.

References arg, FIXNUM_FLAG, FIXNUM_P, INT2FIX, Qnil, rb_funcall(), and rb_yield().

Referenced by range_step().

static VALUE sym_each_i | ( | VALUE | v,
|  | void * | arg
| ) |  |
| static

Definition at line 689 of file range.c.

References Qnil, rb_str_intern(), and rb_yield().

Referenced by range_each().

static VALUE sym_step_i | ( | VALUE | i,
|  | void * | arg
| ) |  |
| static

Definition at line 282 of file range.c.

References arg, FIXNUM_FLAG, FIXNUM_P, INT2FIX, Qnil, rb_funcall(), rb_str_intern(), and rb_yield().

Referenced by range_step().

## Variable Documentation

ID id_beg
| static

Definition at line 23 of file range.c.

Referenced by Init_Range(), range_dumper(), range_loader(), and rb_range_values().

ID id_cmp
| static

Definition at line 23 of file range.c.

Referenced by Init_Range(), r_le(), r_lt(), range_bsearch(), range_check(), range_max(), and range_min().

ID id_div
| static

Definition at line 23 of file range.c.

Referenced by Init_Range(), and range_bsearch().

ID id_end
| static

Definition at line 23 of file range.c.

Referenced by Init_Range(), range_dumper(), range_loader(), and rb_range_values().

ID id_excl
| static

Definition at line 23 of file range.c.

Referenced by Init_Range(), range_dumper(), and range_loader().

ID id_integer_p
| static

Definition at line 23 of file range.c.

Referenced by Init_Range(), and is_integer_p().

ID id_succ
| static

Definition at line 23 of file range.c.

Referenced by discrete_object_p(), Init_Range(), and range_each_func().

VALUE rb_cRange

Definition at line 22 of file range.c.