Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Problems on migrating from Ruby 1.8 to 1.9
Search
elitau
May 16, 2012
Programming
1
510
Problems on migrating from Ruby 1.8 to 1.9
Problems encountered on migration simfy codebase from ruby 1.8 to 1.9
Talk for @colognerb
elitau
May 16, 2012
Tweet
Share
More Decks by elitau
See All by elitau
Feature Toggles
elitau
0
460
Testbarkeit (in Ruby)
elitau
0
65
Testing Best Practices
elitau
2
470
Other Decks in Programming
See All in Programming
開発に寄りそう自動テストの実現
goyoki
1
740
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
210
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
React Native New Architecture 移行実践報告
taminif
1
150
愛される翻訳の秘訣
kishikawakatsumi
1
310
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.2k
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
120
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
370
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
1.9k
sbt 2
xuwei_k
0
250
無秩序からの脱却 / Emergence from chaos
nrslib
2
13k
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
140
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
14k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Fireside Chat
paigeccino
41
3.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.2k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Navigating Team Friction
lara
191
16k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
4 Signs Your Business is Dying
shpigford
186
22k
Transcript
PROBLEMS ON MIGRATING FROM RUBY 1.8 TO 1.9 SEIT 2012
@hurx github.com/elitau
ENCODING • Each and every String needs an Encoding •
# encoding: UTF-8 • http://stackoverflow.com/questions/3291017/how-can-i-avoid- putting-the-magic-encoding-comment-on-top-of-every-utf-8- file-in • https://github.com/m-ryan/magic_encoding • http://blog.grayproductions.net/articles/ ruby_19s_three_default_encodings
LOAD PATHS • Ruby 1.9 removed “.” from load paths
• It was deemed a "security" risk • File.expand_path(__FILE__) • require_relative • require './filename' • http://stackoverflow.com/questions/2900370/why-does- ruby-1-9-2-remove-from-load-path-and-whats-the-alternative
MD5 • md5 module is gone • instead of MD5
it is now Digest::MD5
DEBUGGER • https://github.com/cldwalker/debugger • works with 1.9.2 and 1.9.3
YAML PARSING • Psych (the new ruby YAML parser) is
stricter with syntax • Fix your YAMLs • Dirty fix: in config/boot.rb require 'yaml' YAML::ENGINE.yamler = 'syck' • http://stackoverflow.com/questions/4980877/rails-error- couldnt-parse-yaml
PARSEDATE • Ruby 1.8 has a Parsedate module, gone in
1.9 • use Date.parse instead • http://stackoverflow.com/questions/4724417/ruby-where-has- parsedate-gone-in-1-9
CASE SYNTAX • Colons do not work in 1.9 anymore
• when ‘foo’ : ‘bar’ • when :foo then :bar
ARRAY.TO_S • ree-1.8.7-2011.03> [1,2,3].to_s => "123" • 1.9.3p125> [1,2,3].to_s =>
"[1, 2, 3]" • Do not use implicit conversions • Better: [1,2,3].join(‘’)
MORE RESOURCES • http://www.rubyinside.com/19walkthrough/ 19$, 3 hours, Screencast • http://www.google.com/search?q=ruby+1.8+1.9+difference