Comments (3)
Are you sure about this? I'm able to do cyclic hashes from dev:
[apatterson@nyctaefiebert psych (master)]$ ruby -v
ruby 1.9.2dev (2010-03-19 trunk 26977) [x86_64-darwin10.2.0]
[apatterson@nyctaefiebert psych (master)]$ irb
irb(main):001:0> x = {}=> {}
irb(main):002:0> x[x] = x=> {{...}=>{...}}
irb(main):003:0>
from psych.
Just to make sure my irb wasn't wrong:
[apatterson@nyctaefiebert psych (master)]$ ruby -v
ruby 1.9.2dev (2010-03-19 trunk 26977) [x86_64-darwin10.2.0]
[apatterson@nyctaefiebert psych (master)]$ ruby -e'x = {}; x[x] = x; p x'
{{...}=>{...}}
[apatterson@nyctaefiebert psych (master)]$
from psych.
lchin@Carthage $ ruby -v
ruby 1.9.2dev (2010-03-06 trunk 26827) [x86_64-darwin10.2.0]
lchin@Carthage $ ruby -e'x = {}; x[x] = x; p x'
-e:1:in `[]=': recursive key for hash (ArgumentError)
from -e:1:in `<main>'
Didn't work at the time, but is now fixed in:
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/hash.c?view=log#rev26961
Perhaps it helped that I chatted with nobu on twitter just before those commits.
So it is no longer a problem.
from psych.
Related Issues (20)
- Yes, no and YAML version 1.2 support
- Linter friendly YAML output HOT 3
- Confusing error: Unknown alias: foo (Psych::BadAlias) HOT 2
- `nil` value in Hash generates trailing whitespace HOT 6
- `key: :99` reports value as `:"99"` rather than `":99"` - how to include second colon as part of the value string?
- yaml.h not found and psych.rb:455:in `parse_stream`: undefined method `parse` for #<Psych::Parser HOT 9
- 5.0 release breaks JRuby gem HOT 9
- macOS - will psych.bundle load? HOT 1
- Can't install psych 5.0.1 in macOS on Apple Silicon HOT 19
- Fail to install psych 5.0.1 on Ubuntu with any Ruby version HOT 2
- psych fails to install on windows HOT 1
- Psych::DisallowedClass (Tried to load unspecified class: Time): HOT 1
- Cannot install on an M1 Mac using `--with-libyaml-source-dir`
- Tried to load unspecified class: IPAddr
- dump is not escaping non-printable characters
- Feature: configure block scalar type
- Error loading Psych gem specification on Ruby 3.2.2 HOT 1
- YAML string in exponential format cannot be loaded by YAML 1.2 parser
- Psych::BadAlias error with simple alias HOT 1
- Version 4.0.5 breaks Date deserialization HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psych.