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

fuckitruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fuckitruby

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

#fuckitruby

Tired of NameError ? Tired of the lack of AI? Tired of ruby-not-being-a-grammar-nazi?

Fuck it, ruby, that's not what I meant!

def lala(explicit)
  if exlicit
    do_something_stupid
  else
    explicit
  end
end
/home/penka-was-abducted/lala.rb:2:in `lala': undefined local variable or method `exlicit' for main:Object (NameError)
  from /home/penka-was-abducted/lala.rb:9:in `<main>'

ohh

require 'fuckitruby'

def lala...
fix in 'lala': 'exlicit' to 
  'explicit' 				[ENTER]    
  other name 				[type it]
  fix explicit to exlicit 	[!] [ENTER]
> # entering
# program rewrites itself and reexecutes properly

##faq

  • why

    it's fun.

    it's "a program can self-heal itself on error conditions" little experiment

  • srsly?

    well it's not for production use , but it combines several really cool hacks

    it looks for the local variables in the offending scope using binding_of_caller,

    it uses lewenstein distance to find the most probable fix, thanks hotwater

    it uses parser to find the exact locations of name uses in the method

    it uses colorize to color the output

  • uh it's inspired by magnificient thefuck command

that name sucks

it's an obvious nod to thefuck command.

##kk

Copyright (c) 2015 Alexander Ivanov under the MIT License. See LICENSE for further details.

FAQs

Package last updated on 04 Nov 2015

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