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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
280
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
Basic Architectures
denyspoltorak
0
670
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
CSC307 Lecture 05
javiergs
PRO
0
500
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
210
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Fireside Chat
paigeccino
41
3.8k
エンジニアに許された特別な時間の終わり
watany
106
230k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Git: the NoSQL Database
bkeepers
PRO
432
66k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
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 &.+