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
110
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
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
160
パターンマッチ使ってるかい?(kyobashi.rb)/use-ruby-s-pattern-matching-on-kyobashi-rb
sanfrecce_osaka
0
69
ApplicationController の継承を分割してエラーを減らした話/dividing-application-controller
sanfrecce_osaka
1
160
Input object ではじめる入力値検証/input-value-validation-using-input-object
sanfrecce_osaka
0
330
実例で学ぶRailsアプリケーションデバッグ入門 〜ログインできちゃってました編〜/rails-application-debug-introduction
sanfrecce_osaka
2
630
String#split何もわかっていなかった/didn_t_know_anything_about_string_split
sanfrecce_osaka
0
110
String#split何もわかっていなかった/didn-t-know-anything-about-string-split
sanfrecce_osaka
0
50
パターンマッチ使ってるかい?/use-ruby-s-pattern-matching?
sanfrecce_osaka
0
700
新しいコミュニティを立ち上げるぞい/launch-new-community
sanfrecce_osaka
0
130
Other Decks in Programming
See All in Programming
小さな開発会社を作った理由
polidog
0
1.9k
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
AWS CDKにおける「再利用性」を考える / aws-cdk-reusability
gotok365
6
1.3k
Android開発者のための Kotlin Multiplatform入門
ntaro
0
190
Clean Architecture by TypeScript & NestJS
ryounasso
0
150
Composing an API the *right* way (Droidcon Berlin 2024)
zsmb
1
450
Activities at Cairo Library
cairolibrary720
0
1.2k
feature環境をGitHub ActionsとCloudFormationでいい感じに管理する
nealle
2
310
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
CSC307 Lecture 11
javiergs
PRO
0
240
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
310
なぜ宣言的 UI は壊れにくいのか / Why declarative UI is less fragile
uenitty
29
13k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
Mobile First: as difficult as doing things right
swwweet
219
8.8k
BBQ
matthewcrist
82
9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
129
32k
Imperfection Machines: The Place of Print at Facebook
scottboms
262
13k
Ruby is Unlike a Banana
tanoku
96
10k
Being A Developer After 40
akosma
72
580k
What the flash - Photography Introduction
edds
65
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Git: the NoSQL Database
bkeepers
PRO
423
64k
5 minutes of I Can Smell Your CMS
philhawksworth
200
19k
Optimising Largest Contentful Paint
csswizardry
18
2.6k
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 ʹ৮ΕΔਓ͕ ૿͑ͯ΄͍͠ʙ
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ