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
高速開発のためのコード整理術
sutetotanuki
1
400
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Oxlintはいいぞ
yug1224
5
1.3k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
230
CSC307 Lecture 09
javiergs
PRO
1
830
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
200
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
54
8k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
ラッコキーワード サービス紹介資料
rakko
1
2.3M
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
The World Runs on Bad Software
bkeepers
PRO
72
12k
Facilitating Awesome Meetings
lara
57
6.8k
Amusing Abliteration
ianozsvald
0
100
Crafting Experiences
bethany
1
48
Tell your own story through comics
letsgokoyo
1
810
The SEO identity crisis: Don't let AI make you average
varn
0
240
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 &.+