
LorinRicker
Programming Ruby 3.2 (5th Edition): Beta 6
Title: Programming Ruby 3.2 (5th edition), p 23 (in Beta 6) –
After showing declaration of hashed “instrument_section” values, the sample outputs (following the sentence “Hashes are indexed using the same square bracket notation as arrays.” – two of the following three sample outputs have extraneous characters in the "# => " results:
p instrument_section[“oboe”] # => “woodwind”\n"string" should be: # => “woodwind”
p instrument_section[“cello”] # => “string”\nnil should be: # => “string”
p instrument_section[“bassoon”] # => nil (this one’s okay)
First Post!

noelrappin
Great catch, thanks – it’s just a mistake I made in telling the system how to print the results – this just gets in under the wire and will be fixed in the final edition.
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /zig
- /scala
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /react-native
- /textmate
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /slackware
- /c
- /julia
- /neovim