Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rogerdpack-remembered_evals

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rogerdpack-remembered_evals

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

remembered_evals:

A library to make debugging eval'ed code possible. It monkey patches Kernel.eval, module_eval, and class_eval to save eval'ed code to a file at ._remembered_evals/hash_of_that_file

Thus you can debug [ex: using ruby-debug] THROUGH eval'ed code, now, as well as see appropriate (better) eval'ed code lines in exception backtraces.

Since it saves files by hash, and doesn't rewrite them once saved, you could also edit eval'ed blocks and it will use the edited versions--i.e. it allows you to override certain strings passed to eval [it uses yours instead of the original]-- quite useful for debugging purposes if you use eval at all.

Note that if all you want to do is save the code away [not debug through] then you can set SCRIPT_LINES__ = {} somewhere in your script.

Note also that it breaks eval'ed code that assumes the default binding, i.e. a = 3 eval("a = 4") # breaks eval("a = 4", binding) # works though

The price we pay for debugging convenience. You may want to therefore do all you gem requires before loading it.

FAQs

Package last updated on 10 Aug 2014

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