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
Problems on migrating from Ruby 1.8 to 1.9
Search
elitau
May 16, 2012
Programming
1
500
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
64
Testing Best Practices
elitau
2
460
Other Decks in Programming
See All in Programming
Your Perfect Project Setup for Angular @BASTA! 2025 in Mainz
manfredsteyer
PRO
0
150
CSC509 Lecture 01
javiergs
PRO
1
440
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
250
Le côté obscur des IA génératives
pascallemerrer
0
140
XP, Testing and ninja testing ZOZ5
m_seki
3
570
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
990
CSC305 Lecture 05
javiergs
PRO
0
210
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
130
明日から始めるリファクタリング
ryounasso
0
130
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
200
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
450
クラシルを支える技術と組織
rakutek
0
200
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.9k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Building Applications with DynamoDB
mza
96
6.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
GraphQLとの向き合い方2022年版
quramy
49
14k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
580
Raft: Consensus for Rubyists
vanstee
139
7.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
114
20k
The Cost Of JavaScript in 2023
addyosmani
53
9k
For a Future-Friendly Web
brad_frost
180
9.9k
4 Signs Your Business is Dying
shpigford
185
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