Module: SafeIntern

Defined in:
lib/safe_intern/nil_patch.rb,
lib/safe_intern/exception_patch.rb,
ext/symbol_defined/symbol_defined.c

Overview

Copyright © 2014 Jan Rusnacko

This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the MIT license.

Defined Under Namespace

Modules: ExceptionPatch, NilPatch

Class Method Summary collapse

Class Method Details

.symbol_defined?(str) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
16
17
18
# File 'ext/symbol_defined/symbol_defined.c', line 10

VALUE
symbol_defined(VALUE self, VALUE str)
{
    if(rb_check_id(&str)) {
        return Qtrue;
    } else {
        return Qfalse;
    }
}