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
110
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
230
パターンマッチ使ってるかい?(kyobashi.rb)/use-ruby-s-pattern-matching-on-kyobashi-rb
sanfrecce_osaka
0
120
ApplicationController の継承を分割してエラーを減らした話/dividing-application-controller
sanfrecce_osaka
1
190
Input object ではじめる入力値検証/input-value-validation-using-input-object
sanfrecce_osaka
0
380
実例で学ぶRailsアプリケーションデバッグ入門 〜ログインできちゃってました編〜/rails-application-debug-introduction
sanfrecce_osaka
2
670
String#split何もわかっていなかった/didn_t_know_anything_about_string_split
sanfrecce_osaka
0
120
String#split何もわかっていなかった/didn-t-know-anything-about-string-split
sanfrecce_osaka
0
51
パターンマッチ使ってるかい?/use-ruby-s-pattern-matching?
sanfrecce_osaka
0
780
Other Decks in Programming
See All in Programming
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Piniaの現状と今後
waka292
5
1.5k
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
130
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
330
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
550
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
110
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
140
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
160
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
4
1.6k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
150
How to Think Like a Performance Engineer
csswizardry
19
1.1k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Bash Introduction
62gerente
608
210k
Six Lessons from altMBA
skipperchong
26
3.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Designing the Hi-DPI Web
ddemaree
280
34k
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 ʹ৮ΕΔਓ͕ ૿͑ͯ΄͍͠ʙ
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ