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
Rick Liu
January 22, 2016
Programming
71
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Safe Navigation in Ruby 2.3
Introduction the new operator and its problem.
Rick Liu
January 22, 2016
More Decks by Rick Liu
See All by Rick Liu
Functional Programming Concepts
rickliu
0
230
You Don't Need a JavaScript Framework
rickliu
0
130
Agile Design
rickliu
0
81
Active Job in Rails 4.2
rickliu
0
63
Other Decks in Programming
See All in Programming
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
200
はてなアカウント基盤 State of the Union
cockscomb
1
1.2k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
780
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
560
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.4k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
270
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.7k
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
330
Agentic UI
manfredsteyer
PRO
0
220
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
150
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
210
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
1k
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
760
Raft: Consensus for Rubyists
vanstee
141
7.6k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
How STYLIGHT went responsive
nonsquared
100
6.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
880
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
210
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 &.+