Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Safe Navigation in Ruby 2.3
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Rick Liu
January 22, 2016
Programming
0
62
Safe Navigation in Ruby 2.3
Introduction the new operator and its problem.
Rick Liu
January 22, 2016
Tweet
Share
More Decks by Rick Liu
See All by Rick Liu
Functional Programming Concepts
rickliu
0
220
You Don't Need a JavaScript Framework
rickliu
0
130
Agile Design
rickliu
0
78
Active Job in Rails 4.2
rickliu
0
57
Other Decks in Programming
See All in Programming
Patterns of Patterns
denyspoltorak
0
1.4k
ぼくの開発環境2026
yuzneri
0
210
CSC307 Lecture 06
javiergs
PRO
0
680
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
組織で育むオブザーバビリティ
ryota_hnk
0
170
Grafana:建立系統全知視角的捷徑
blueswen
0
330
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
110
Implementation Patterns
denyspoltorak
0
280
AI & Enginnering
codelynx
0
110
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
270
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
650
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
93
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
How GitHub (no longer) Works
holman
316
140k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
57
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
Transcript
Safe Navigation in Ruby 2.3
Safe Navigation > some_array.first.positive? > [].first.positive? (value = some_array.first) &&
value.positive? > some_array.first&.positive? # => true # => NoMethodError: undefined method `positive?' for nil:NilClass # => nil
Safe Navigation if user.account && user.account.trial? # process trial account
settings end if user.account&.trial? # process trial account settings end if user.account && user.account != previous_account # setup new account end if user.account &.!= previous_account # setup new account end &.&, &.<<, and &.+