Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions
safe.c File Reference
`#include "ruby/ruby.h"`
`#include "vm_core.h"`

Go to the source code of this file.

## Macros
#define | SAFE_LEVEL_MAX RUBY_SAFE_LEVEL_MAX

## Functions
int | ruby_safe_level_2_warning (void)
int | rb_safe_level (void)
void | rb_set_safe_level_force (int safe)
void | rb_set_safe_level (int level)
void | rb_secure (int level)
void | rb_secure_update (VALUE obj)
void | rb_insecure_operation (void)
void | rb_check_safe_obj (VALUE x)
void | Init_safe (void)

## Macro Definition Documentation

## ◆ SAFE_LEVEL_MAX

#define SAFE_LEVEL_MAX RUBY_SAFE_LEVEL_MAX

Definition at line 12 of file safe.c.

## Function Documentation

## ◆ Init_safe()

void Init_safe | ( | void |  | ) |

Definition at line 142 of file safe.c.

References ruby::backward::cxxanyargs::rb_define_virtual_variable().

## ◆ rb_check_safe_obj()

void rb_check_safe_obj | ( | VALUE | x | ) |

Definition at line 136 of file safe.c.

References rb_warn().

## ◆ rb_insecure_operation()

void rb_insecure_operation | ( | void |  | ) |

Definition at line 122 of file safe.c.

References PRIsVALUE, rb_eSecurityError, rb_frame_callee(), rb_id2str, rb_raise(), and rb_warn().

## ◆ rb_safe_level()

int rb_safe_level | ( | void |  | ) |

Definition at line 31 of file safe.c.

References GET_VM, and rb_warn().

## ◆ rb_secure()

void rb_secure | ( | int | level | ) |

Definition at line 99 of file safe.c.

References GET_VM, PRIsVALUE, rb_eSecurityError, rb_frame_callee(), rb_id2str, rb_raise(), and rb_warn().

## ◆ rb_secure_update()

void rb_secure_update | ( | VALUE | obj | ) |

Definition at line 116 of file safe.c.

References rb_warn().

## ◆ rb_set_safe_level()

void rb_set_safe_level | ( | int | level | ) |

Definition at line 45 of file safe.c.

References fprintf(), GET_VM, path, rb_eArgError, rb_raise(), rb_source_location_cstr(), rb_warn(), rb_vm_struct::safe_level_, SAFE_LEVEL_MAX, and stderr.

## ◆ rb_set_safe_level_force()

void rb_set_safe_level_force | ( | int | safe | ) |

Definition at line 38 of file safe.c.

References GET_VM, and rb_warn().

## ◆ ruby_safe_level_2_warning()

int ruby_safe_level_2_warning | ( | void |  | ) |

Definition at line 24 of file safe.c.

References rb_warn().