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
OpenStruct's exception, special-string, Enumerator#size #383
Conversation
* lib/ostruct.rb (OpenStruct#modifiable): Builtin classies raises RuntimeError on frozen instance. TypeError is an old way. * test/ostruct/test_ostruct.rb: Added tests for above.
* lib/ostruct.rb (OpenStruct#delete_field): Use Symbol instead of String. Not only adjusting style. Some special string behave `string.to_sym.to_s != string`. * test/ostruct/test_ostruct.rb: Added tests for above.
* lib/ostruct.rb (OpenStruct#each_pair): Currently, Enumerator has size. And Struct#each_pair keeps members-size. * test/ostruct/test_ostruct.rb: Added tests for above.
* lib/ostruct.rb (OpenStruct#method_missing): NoMethodError should have #name and #args. * test/ostruct/test_ostruct.rb: Added tests for above.
@marcandre Could you review this when you get a chance? |
These look really good :+1 |
Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
These were all great commits. They were committed almost verbatim; I tweaked a bit the commit messages. There was one test that relied on |
Thanks! |
instead of TypeError. Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Follow ticket-9048 See below links * http://bugs.ruby-lang.org/issues/9048 * ruby/ruby#383 (comment)
Follow ticket-9048 See below links * http://bugs.ruby-lang.org/issues/9048 * ruby/ruby#383 (comment)
instead of TypeError. Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Kenichi Kamiya. [Fixes rubyGH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
No description provided.