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
530
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by elitau
See All by elitau
Feature Toggles
elitau
0
490
Testbarkeit (in Ruby)
elitau
0
73
Testing Best Practices
elitau
2
500
Other Decks in Programming
See All in Programming
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
290
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
540
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
550
今さら聞けない .NET CLI
htkym
0
140
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
420
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
240
Claude Team Plan導入・ガイド
tk3fftk
0
240
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
180
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
610
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
150
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
140
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
540
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Leo the Paperboy
mayatellez
8
1.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
New Earth Scene 8
popppiees
3
2.4k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
610
A Soul's Torment
seathinner
6
3.1k
Building the Perfect Custom Keyboard
takai
2
820
Raft: Consensus for Rubyists
vanstee
141
7.6k
Claude Code のすすめ
schroneko
67
230k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
640
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