---
title: "ruby | Today I Learned | OOZOU"
description: "Short, practical ruby notes from the OOZOU team."
canonical: https://oozou.com/til-topics/ruby
locale: en
---

# ruby | Today I Learned

> Short, practical ruby notes from the OOZOU team.

- [Allow pasting multiline ruby blocks in Pry when using leading dot notation](https://oozou.com/til/allow-pasting-multiline-ruby-blocks-in-pry-when-using-leading-dot-notation-116) ([markdown](https://oozou.com/til/allow-pasting-multiline-ruby-blocks-in-pry-when-using-leading-dot-notation-116.md)) (2021-04-30): We use leading dot notation a lot now e.g.
- [Heredoc without interpolation](https://oozou.com/til/heredoc-without-interpolation-74) ([markdown](https://oozou.com/til/heredoc-without-interpolation-74.md)) (2020-10-14): Sometimes you want to use Ruby's Heredoc without interpolation ('#{....}'). You can do this by adding single dashes around your keyword:
- [Automagical Intermediate-level Hashtables in Ruby](https://oozou.com/til/automagical-intermediate-level-hashtables-in-ruby-62) ([markdown](https://oozou.com/til/automagical-intermediate-level-hashtables-in-ruby-62.md)) (2020-10-13): All intermediate-level hashtables will be created automagically
- [Change Ruby version for single command with rbenv](https://oozou.com/til/change-ruby-version-for-single-command-with-rbenv-68) ([markdown](https://oozou.com/til/change-ruby-version-for-single-command-with-rbenv-68.md)) (2020-10-13): You can switch Ruby version temporarily with rbenv local
- [Change VS Code Go to definition to Cmd+Click](https://oozou.com/til/change-vs-code-go-to-definition-to-cmd-click-59) ([markdown](https://oozou.com/til/change-vs-code-go-to-definition-to-cmd-click-59.md)) (2020-10-13): Just open your user settings JSON file and use this option:
- [Improve Bundler performance](https://oozou.com/til/improve-bundler-performance-56) ([markdown](https://oozou.com/til/improve-bundler-performance-56.md)) (2020-10-13): Level up your bundler performance by running bundler tasks concurrently in jobs:
- [optional relation + RSpec w/shoulda-matchers](https://oozou.com/til/optional-relation-rspec-w-shoulda-matchers-41) ([markdown](https://oozou.com/til/optional-relation-rspec-w-shoulda-matchers-41.md)) (2020-10-13): User 1 - 0..1 Laptop
- [Remove ruby 2.6 bundled bundler](https://oozou.com/til/remove-ruby-2-6-bundled-bundler-39) ([markdown](https://oozou.com/til/remove-ruby-2-6-bundled-bundler-39.md)) (2020-10-13): Generating a rails 6 app with ruby 2.6+ when you have bundler v2 installed creates unusable binstubs. If you are seeing this error You must use Bundler 2 or greater with this lockfile. you can remove…
- [Run rubocop against your current branch](https://oozou.com/til/run-rubocop-against-your-current-branch-21) ([markdown](https://oozou.com/til/run-rubocop-against-your-current-branch-21.md)) (2020-10-13): Run rubocop against your current branch
- [Run rubocop before commit](https://oozou.com/til/run-rubocop-before-commit-8) ([markdown](https://oozou.com/til/run-rubocop-before-commit-8.md)) (2020-10-13): Git hooks are super powerful for automating tasks and enforcing coding standards in a Git repository. One common use case for Git hooks is to run automated tests and code analysis tools before…
- [Suppress rspec warnings](https://oozou.com/til/suppress-rspec-warnings-33) ([markdown](https://oozou.com/til/suppress-rspec-warnings-33.md)) (2020-10-13): $ RUBYOPT=W0 bundle exec rspec spec/ ...
- [You can use FactoryBot for non ActiveRecord models](https://oozou.com/til/you-can-use-factorybot-for-non-activerecord-models-45) ([markdown](https://oozou.com/til/you-can-use-factorybot-for-non-activerecord-models-45.md)) (2020-10-13): You can use FactoryBot's initialize\with* method to initialize an object any way you like which allows you to factorize any of your objects at will

All notes: [Today I Learned](https://oozou.com/til) ([markdown](https://oozou.com/til.md)).

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
