| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
[Fixes ruby/ostruct#23]
|
| |
|
|
|
|
|
| |
This fixes cases where you can super in something that inherits from OpenStruct
Co-authored-by: John Hawthorn <john@hawthorn.email>
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit ee7cc6ac35cfb056b3946b1dcd6d4d5a140ccacf.
I'm not sure I agree with the spec, but I just tweaked it.
|
| |
|
|
|
|
| |
Ruby specs expected this method to be public
|
| |
|
| |
|
| |
|
|
|
|
| |
Patch adapted from Pietro Monteiro [Fixes bug#8382]
|
| |
|
|
|
|
| |
Internally, use only bang methods
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Found because `json` has a bad example in its test suite.
This implementation still offers better encapsulation.
|
|
|
|
| |
This reverts commit 28e60b0045b5732bca11012d81a5223001faa6b2.
|
|
|
|
| |
This reverts commit e026e186f4..12a2e32d43.
|
| |
|
| |
|
|
|
|
| |
[Fixes https://bugs.ruby-lang.org/issues/15409]
|
|
|
|
| |
`new_ostruct_member!`
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commits:
dc38e99813
22c082fcfd
b499e0f9ff
58e5876646
Add test for overriden private methods
[Fixes https://bugs.ruby-lang.org/issues/12136]
|
|
|
|
|
|
| |
ruby versions."
This reverts commit 4cd1fc8b3559353069860eee90b1b5bade013917.
|
|
|
|
|
| |
* Fix links to Dig Methods document
* Fix links to Dig Methods document
|
|
|
|
|
|
|
| |
Adds a full discussion of #dig, along with links from Array, Hash, Struct, and OpenStruct.
CSV::Table and CSV::Row are over in ruby/csv. I'll get to them soon.
The art to the thing is to figure out how much (or how little) to say at each #dig.
|
|
|
|
|
|
|
|
|
|
|
| |
"requiring version.rb" strategy has some issues.
- cannot work when cross-compiling
- often introduces wrong namespace
- must know the superclasses
- costs at each runtime than at build-time
etc.
|
|
|
|
|
|
|
| |
In https://github.com/ruby/ruby/commit/9be3295d53b6fd9f8a3ad8157aa0655b1976d8ac,
OpenStruct's documentation stopped to be rendered by RDoc
(there should be no additional code between documentation
comment and documented class). Fixing this.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Patch by Lisa Ugray (issue #15515)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
Patch by Shuji Kobayashi.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
They should work separatedly from Ruby core repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
Patch by yuuji.yaginuma [Fix GH-1890]
Since `remove_method` is public.
Ref: https://bugs.ruby-lang.org/issues/14133
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Yuuji Yaginuma. [Fixes GH-1808]
In other classes, `FrozenError` will be raised if change the frozen
object.
In order to match the behavior, I think that `FrozenError` should
use in `OpenStruct`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If uplevel keyword is given, the warning message is prepended
with caller file and line information and the string "warning: ".
The use of the uplevel keyword makes Kernel#warn format output
similar to how rb_warn formats output.
This patch modifies net/ftp and net/imap to use Kernel#warn
instead of $stderr.puts or $stderr.printf, since they are used
for printing warnings.
This makes lib/cgi/core and tempfile use $stderr.puts instead of
warn for debug logging, since they are used for debug printing
and not for warning.
This does not modify bundler, rubygems, or rdoc, as those are
maintained outside of ruby and probably wish to remain backwards
compatible with older ruby versions.
rb_warn_m code is originally from nobu, but I've changed it
so that it only includes the path and lineno from uplevel
(not the method), and also prepends the string "warning: ",
to make it more similar to rb_warn.
From: Jeremy Evans code@jeremyevans.net
Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
Patch adapted from Espartaco Palma. [GH-1714] [Bug #14000]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* lib/ostruct.rb (OpenStruct#respond_to_missing?): this makes
OpenStruct#respond_to? works on any OpenStruct instance,
just like Kernel#respond_to? does, without workarounds.
[ruby-core:80292] [Bug #13358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* lib/ostruct.rb (method_missing): raise an exception with proper
visibility message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* lib/ostruct.rb (OpenStruct.allocate): initialize an instance
variable directly, without calling `intialize` method which may
be overridden in a subclass. [ruby-core:80292] [Bug #13358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* update paragraph on implementation:
define_singleton_method is used, not define_method
* add call-seq with return values for each_pair
* adopt description of dig from Array and Hash
* fix description of the hash method
* :nodoc: initialize_copy, respond_to_missing?
* other small improvements, e.g. use the term `attribute' in the docs
(instead of `member'), which is clearer for users of the class
* improve code examples: e.g. use more consistent style (always use
double quotes, drop `p' and `puts', ...), update inspect output,
use example data that is not prone to change (like population)
* add more code examples
* fix some small errors and grammar
[ruby-core:79265] [Bug #13159]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
From a patch by Marcus Stollsteimer. [Fixes #13169]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* lib/ostruct.rb (modifiable?, new_ostruct_member!, table!):
rename methods for internal use with suffixes and make private,
[ruby-core:71069] [Bug #11587]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
Bug revealed by RubySpec [ruby-core:72639]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* lib/ostruct.rb (freeze): define deferred accessors before
freezing to get rid of an error when just reading frozen
OpenStruct.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|