New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rubyvm-frozencore

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rubyvm-frozencore

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

RubyVM::FrozenCore

An evil gem to expose hidden class in CRuby core.

Usage

RubyVM::FrozenCore
# NameError: uninitialized constant RubyVM::FrozenCore

require 'rubyvm/frozencore'
RubyVM::FrozenCore #=> BasicObject

RubyVM::FrozenCore.methods
# => [:"core#set_method_alias",
#  :"core#set_variable_alias",
#  :"core#undef_method",
#  :"core#define_method",
#  :"core#define_singleton_method",
#  :"core#set_postexe",
#  :"core#hash_from_ary",
#  :"core#hash_merge_ptr",
#  :"core#hash_merge_kwd",
#  ...

# You can call hidden core methods with this class.
# Of course you can use Module.remove_method in normal use case. This is a useless example.
RubyVM::FrozenCore.send(:"core#undef_method", String, :prepend)

"b".prepend("a")
# NoMethodError: undefined method `prepend' for "b":String

See also

There is already a gem with the same purpose.

https://github.com/charliesome/frozen_core

But it relied on a bug which was fixed in Ruby 2.1.0. rubyvm-frozencore works with Ruby >= 2.1.0.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 30 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc