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
Ruby2.7の機能を使いたくてruby-next使ってみた/try-using-ruby-next
Search
Masatoshi Moritsuka
July 25, 2020
Programming
0
120
Ruby2.7の機能を使いたくてruby-next使ってみた/try-using-ruby-next
Masatoshi Moritsuka
July 25, 2020
Tweet
Share
More Decks by Masatoshi Moritsuka
See All by Masatoshi Moritsuka
gem_rbs_collection へのコントリビュートから始める Ruby の型の世界/contributing-gem-rbs-collection
sanfrecce_osaka
0
160
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
290
パターンマッチ使ってるかい?(kyobashi.rb)/use-ruby-s-pattern-matching-on-kyobashi-rb
sanfrecce_osaka
0
140
ApplicationController の継承を分割してエラーを減らした話/dividing-application-controller
sanfrecce_osaka
1
220
Input object ではじめる入力値検証/input-value-validation-using-input-object
sanfrecce_osaka
0
390
実例で学ぶRailsアプリケーションデバッグ入門 〜ログインできちゃってました編〜/rails-application-debug-introduction
sanfrecce_osaka
2
700
String#split何もわかっていなかった/didn_t_know_anything_about_string_split
sanfrecce_osaka
0
130
String#split何もわかっていなかった/didn-t-know-anything-about-string-split
sanfrecce_osaka
0
56
パターンマッチ使ってるかい?/use-ruby-s-pattern-matching?
sanfrecce_osaka
0
830
Other Decks in Programming
See All in Programming
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
850
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
140
Security_for_introducing_eBPF
kentatada
0
110
良いユニットテストを書こう
mototakatsu
8
2.8k
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
840
テストコード書いてみませんか?
onopon
2
140
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
270
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
fs2-io を試してたらバグを見つけて直した話
chencmd
0
240
快速入門可觀測性
blueswen
0
380
Exploring: Partial and Independent Composables
blackbracken
0
100
情報漏洩させないための設計
kubotak
3
350
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
44
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Typedesign – Prime Four
hannesfritz
40
2.4k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Agile that works and the tools we love
rasmusluckow
328
21k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Transcript
Ruby2.7 ͷػೳΛ͍ͨͯ͘ ruby-next ͬͯΈͨ ௩ ਅ(@sanfrecce_osaka) 2020/07/25 Kaigi on Rails
new #kaigionrails
ࣗݾհ ➤ ௩ ਅ ➤ GitHub: @sanfrecce-osaka ➤ Twitter: @sanfrecce_osaka
➤ Qiita: @sanfrecce_osaka ➤ 20199݄: େࡕ → ொా ➤ גࣜձࣾϥάβΠΞ ➤ ruby-jpͷॅਓ ➤ ίϛϡχςΟɾษڧձΦλΫ
ʲએʳຖ݄ୈҰ༵ۚʹ Machida.rb ͬͯ·͢
࠷ۙͷࣄͷ
Rails API + TypeScript + React
େྔͷ any
@typescript-eslint/no-explicit-any=>8544
rspec-openapi
request spec ↓ Open APIܗࣜ ͷ υΩϡϝϯτ
͜Εָ
But
ੜ͞ΕΔ yaml͔Β TSͷܕΛॻ͘ͷਓྗ
Let's making a gem!!
Gem Λ࡞Δʹ ͋ͨͬͯ
yaml Λ ύʔε͢Δ ඞཁ͕͋Δ
ύλʔϯϚονϯά ͍͍ͨ
φϯύϥ ͍͍ͨ
But
ϓϩδΣΫτͷRuby 2.5.0
ͦ͜Ͱ ruby-next
ruby-next ➤ Ruby ΛτϥϯεύΠϧͯ͘͠ΕΔ Gem ➤ ΞϓϦέʔγϣϯଆ => ϥϯλΠϜϞʔυ ➤
ϥΠϒϥϦଆ => CLI ͔ΒτϥϯεύΠϧ(ࠓճͬͪ͜) ➤ Refinements Λར༻͍ͯ͠Δ ➤ αϙʔτൣғ͕͍ ➤ https://github.com/ruby-next/ruby-next/blob/master/ SUPPORTED_FEATURES.md
ҙ ➤ require_relative Ͱͳ͘ require Ͱͳ͍ͱͩΊ ➤ τϥϯεύΠϥ rewirteϞʔυ ͱ
ASTϞʔυ ͷ 2छ ➤ σϑΥϧτ ASTϞʔυ ➤ 2.7ܥ Ͱ rewriteϞʔυ ͷΈ ➤ ಛఆͷػೳ໌ࣔతʹΦϓγϣϯΛࢦఆ͢Δඞཁ͕͋Δ
σϞ
࠷ޙʹ
ruby-next Ͱ 2.7 2.8 ʹ৮ΕΔਓ͕ ૿͑ͯ΄͍͠ʙ
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ