-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serializing HighLine::String to yaml produces strange results #69
Comments
Strange results in that you just want a normal String? I'm just making sure I understand. |
Yes, that, and the serialization does not appear to be reversible (which is the bigger problem):
Output:
|
Yeah, we do need to fix this. |
This is a problem with YAML/Psych in ruby 2.0.0-p0 which does not handle subclasses of String correctly e.g. require 'yaml'
class X < String
end
x =X.new('foo')
p YAML.load(x.to_yaml) Output
|
- Due to an issue in the highline gem, serializing HighLine::Strings produce weird results. This is a "fix" for that greater issue. - JEG2/highline#69 closes #18
This was a YAML related bug (not HighLine one). Writing this test to protect against regressions.
I couldn't reproduce the issue anymore. I think it was fixed in YAML. Added a test on 1c6a8fa to serve as guard against any future regression. |
Add test for Yaml serialization of HighLine::String - closes #69
Perfect. |
This was a YAML related bug (not HighLine one). Writing this test to protect against regressions.
Consider:
Output:
I'm using ruby 2.0.0-p0.
The text was updated successfully, but these errors were encountered: