Ruby: compar.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Functions | Variables
compar.c File Reference
`#include "id.h"`
`#include "internal.h"`
`#include "internal/compar.h"`
`#include "internal/error.h"`
`#include "internal/vm.h"`
`#include "ruby/ruby.h"`

Go to the source code of this file.

## Functions
void | rb_cmperr (VALUE x, VALUE y)
VALUE | rb_invcmp (VALUE x, VALUE y)
void | Init_Comparable (void)

## Variables
VALUE | rb_mComparable

## Function Documentation

## ◆ Init_Comparable()

void Init_Comparable | ( | void |  | ) |

Definition at line 295 of file compar.c.

References rb_define_method, rb_define_module(), and rb_mComparable.

## ◆ rb_cmperr()

void rb_cmperr | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 28 of file compar.c.

References BUILTIN_TYPE, PRIsVALUE, rb_eArgError, rb_inspect(), rb_obj_class(), rb_raise(), SPECIAL_CONST_P, and T_FLOAT.

Referenced by rb_cmpint(), and rb_num_coerce_relop().

## ◆ rb_invcmp()

VALUE rb_invcmp | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 50 of file compar.c.

References INT2FIX, NIL_P, Qnil, Qundef, rb_cmpint, and rb_exec_recursive().

## Variable Documentation

## ◆ rb_mComparable

VALUE rb_mComparable

Definition at line 19 of file compar.c.

Referenced by Init_Comparable(), Init_Complex(), Init_date_core(), Init_File(), Init_Numeric(), Init_ossl_x509name(), Init_String(), and Init_Time().