Go back Scroll to reddit comments

Ruby puns


January 21, 2020

These are pretty bad. You've been warned.

    cheese = ""           # String cheese
    browns = {}           # Hash browns
    hiphip   = []         # hiphip array
    case; end             # brief case
    foods.freeze          # frozen foods
    love.taint            # tainted love
    attr_writer :irish    # Irish setter
    {"corned" => "beef"}  # corned beef hash
    raise "hell"          # raising hell
    $village              # global village 
    
    usual_suspects = 1.99
    usual_suspects.ceil      # round up the usual suspects
    
    class JesusChrist < God
      super(*)               # Jesus Christ Superstar
    end


[Back] [permalink]