Skip to content

Instantly share code, notes, and snippets.

Constant lookup in Ruby can happen lexically or through the ancestry tree of the receiver(a class or module). You can identify which lookup rules are being applied by the context you're in or by the syntax being used to define a class or module.

A class body that is defined as class A::B::C; …; end will lookup constants through the ancestry tree when a constant is evaluated in its class body. Anytime you see A::B::C being used as syntax to define a class or lookup the value of a constant the ancestry tree is being used for the lookup.

@rrundzans
rrundzans / setup.sh
Created January 6, 2023 12:42 — forked from typelogic/setup.sh
SSL server/client in socat
#!/bin/sh
#
if [ $# -eq 0 ];then
echo "Supply client|server"
exit 1
fi
FILENAME=$1
openssl genrsa -out $FILENAME.key 1024
@rrundzans
rrundzans / rvm_cheetsheat.md
Created March 30, 2022 11:07 — forked from zambrose/rvm_cheetsheat.md
RVM Cheatsheet

RVM Cheatsheet

Updating RVM
  • rvm get stable
Install Ruby Dependencies
  • rvm requirements

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql