Module: SafeIntern::ExceptionPatch
- Included in:
- String
- Defined in:
- lib/safe_intern/exception_patch.rb
Instance Method Summary collapse
Instance Method Details
#intern(allow_unsafe = nil) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/safe_intern/exception_patch.rb', line 9 def intern(allow_unsafe = nil) if allow_unsafe == :allow_unsafe || SafeIntern.symbol_defined?(self) super() else fail UnsafeInternException end end |
#to_sym(allow_unsafe = nil) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/safe_intern/exception_patch.rb', line 17 def to_sym(allow_unsafe = nil) if allow_unsafe == :allow_unsafe || SafeIntern.symbol_defined?(self) super() else fail UnsafeInternException end end |