# Diggin' and Fetchin' with TruffleRuby

DevFeed: [Diggin' and Fetchin' with TruffleRuby](<https://devfeed.tech/articles/diggin-and-fetchin-with-truffleruby-1372.md>)

Original publisher: [Read original article](<https://shopify.engineering/dig-fetch-truffleruby>)

Author: Julie Antunovic

Published: 2021-08-20T15:00:00Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [developer](<https://devfeed.tech/tags/developer.md>), [performance](<https://devfeed.tech/tags/performance.md>), [production](<https://devfeed.tech/tags/production.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

## AI overview

The article investigates an unusual Ruby pattern that chains Hash#fetch calls to retrieve values from nested hashes. Refactoring the production code leads to the discovery of a TruffleRuby performance issue and a prototype compiler-level solution.

## Source excerpt

It begins with a clever Ruby trick to extract a value from a deeply nested hash we want to refactor and ends with a prototype changing the language itself.