2020/12/30(Wed) 19:36:03 macOS(またはLinux)用パッケージマネージャー — Homebrew https://brew.sh/index_ja 2020/12/30(Wed) 19:36:27 プロと読み解く Ruby 3.0 NEWS - クックパッド開発者ブログ https://techlife.cookpad.com/entry/2020/12/25/155741 2020/12/30(Wed) 19:37:02 Ruby 3.0 の Ractor を自慢したい - クックパッド開発者ブログ https://techlife.cookpad.com/entry/2020/12/26/131858 2020/12/30(Wed) 19:37:28 Ruby Programming Language https://www.ruby-lang.org/en/ 2020/12/30(Wed) 19:37:53 Ruby-Doc.org: Documenting the Ruby Language https://ruby-doc.org/ 2020/12/30(Wed) 19:38:21 Index of Files, Classes & Methods in Ruby 3.0.0 (Ruby 3.0.0) https://ruby-doc.org/core-3.0.0/ 2020/12/30(Wed) 19:39:35 Ruby 3.0.0 Standard Library Documentation https://ruby-doc.org/stdlib-3.0.0/
とりあえず、macOS Big Sur バージョン 11.1 に Ruby 3.0.0 をインストールした。
ターミナル
2020/12/30(Wed) 19:41:47 ~/Desktop/xxxxx/Ruby/ ❯ sw_vers ProductName:macOSProductVersion: 11.1 BuildVersion: 20C69 ~/Desktop/xxxxx/Ruby/ ❯ rbenv install -l 2.5.8 2.6.6 2.7.2 3.0.0 jruby-9.2.14.0 mruby-2.1.2 rbx-5.0 truffleruby-20.3.0 truffleruby+graalvm-20.3.0 Only latest stable releases for each Ruby implementation are shown. Use 'rbenv install --list-all / -L' to show all local versions. ~/Desktop/xxxxx/Ruby/ ❯ rbenv install 3.0.0 Downloading openssl-1.1.1i.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242 Installing openssl-1.1.1i... Installed openssl-1.1.1i to /Users/xxxxxx/.rbenv/versions/3.0.0 Downloading ruby-3.0.0.tar.gz... -> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0.tar.gz Installing ruby-3.0.0... ruby-build: using readline from homebrew Installed ruby-3.0.0 to /Users/xxxxxx/.rbenv/versions/3.0.0 ~/Desktop/xxxxx/Ruby/ ❯ rbenv rehash ~/Desktop/xxxxx/Ruby/ ❯ cd Ruby\ 3.x ~/Desktop/xxxxx/Ruby/Ruby 3.x ❯ rbenv versions system * 2.6.5 (set by /Users/xxxxxx/Desktop/Ruby/.ruby-version) 3.0.0 ~/Desktop/xxxxx/Ruby/Ruby 3.x ❯ rbenv local 3.0.0 ~/Desktop/xxxxx/Ruby/Ruby 3.x ❯ ruby -v ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20] ~/Desktop/xxxxx/Ruby/Ruby 3.x ❯ ls pattern.rb ~/Desktop/xxxxx/Ruby/Ruby 3.x ❯ cat pattern.rb #!/usr/bin/env ruby a = [1, 2, 3] puts "case #{a}" puts "in [x, y, z]" case a in [x, y, z] puts "x:#{x} y:#{y} z:#{z}" end ~/Desktop/xxxxx/Ruby/Ruby 3.x ❯ ./pattern.rb case [1, 2, 3] in [x, y, z] x:1 y:2 z:3 ~/Desktop/xxxxx/Ruby/Ruby 3.x ❯