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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
67
Testing Best Practices
elitau
2
490
Other Decks in Programming
See All in Programming
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
410
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
850
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
570
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
4
2.1k
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.6k
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
480
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
300
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.1k
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
560
Nuxt Server Components
wattanx
0
160
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
240
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.5k
Context Engineering - Making Every Token Count
addyosmani
9
780
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Why Our Code Smells
bkeepers
PRO
340
58k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Abbi's Birthday
coloredviolet
2
5.9k
A designer walks into a library…
pauljervisheath
210
24k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How to Talk to Developers About Accessibility
jct
2
160
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