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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
elitau
May 16, 2012
Programming
1
520
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
480
Testbarkeit (in Ruby)
elitau
0
66
Testing Best Practices
elitau
2
480
Other Decks in Programming
See All in Programming
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.9k
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
130
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
420
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
5
390
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
360
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
400
AHC061解説
shun_pi
0
360
株式会社 Sun terras カンパニーデック
sunterras
0
2.1k
Unity6.3 AudioUpdate
cova8bitdots
0
120
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
How to stabilize UI tests using XCTest
akkeylab
0
110
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
200
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Git: the NoSQL Database
bkeepers
PRO
432
66k
Un-Boring Meetings
codingconduct
0
220
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
100
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
820
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