Граф коммитов

126 Коммитов

Автор SHA1 Сообщение Дата
Marc-André Lafortune 8a38419b73 [ruby/ostruct] v0.5.5
https://github.com/ruby/ostruct/commit/ce879e56cf
2022-04-01 00:18:36 +09:00
Charles Oliver Nutter 8751769637 [ruby/ostruct] Avoid using block_given in the presence of aliases
defined?(yield) bypasses the block_given? method (or any aliases
to it) and always does the right thing.

https://github.com/ruby/ostruct/commit/4c38fe612e
2022-04-01 00:16:49 +09:00
Marc-André Lafortune 4c4a1e2035 [ruby/ostruct] v0.5.4
https://github.com/ruby/ostruct/commit/fe19de4644
2022-03-24 21:38:26 +09:00
Marc-André Lafortune ad5754162b [ruby/ostruct] Avoid aliasing `block_given?` for JRuby [Fixes #40]
https://github.com/ruby/ostruct/commit/14d04ff694
2022-03-24 21:37:14 +09:00
Marc-André Lafortune 0adabdc53d [ruby/ostruct] v0.5.3
https://github.com/ruby/ostruct/commit/322efd0e61
2022-03-07 20:08:26 +09:00
Ladislav Gallay e1391bf96f [ruby/ostruct] Fix class and method as attribute names
https://github.com/ruby/ostruct/commit/7258535073
2022-03-07 20:08:22 +09:00
Marc-André Lafortune c47e821b89 [ruby/ostruct] Bump version to 0.5.2 2021-12-08 14:47:46 -05:00
Koichi Sasada 9c26931635 [ruby/ostruct] `Proc`'s self should be shareable.
To fix the issue https://bugs.ruby-lang.org/issues/18243
we need to make sure the Proc's self is shareable.
These procs are used by `define_method` and it doesn't use
Proc's self, so `nil` is enough.
2021-12-08 14:47:46 -05:00
Marc-André Lafortune ad4ac68c7b [ruby/ostruct] ostruct v0.5.1 2021-12-06 23:21:24 -05:00
Marc-André Lafortune 95d9bcf2b2 [ruby/ostruct] Alias less methods
Skips methods that do not end with letter (in particular `!~` and `=~`)
For JRuby, also skip `instance_exec`, `instance_eval` and `eval`
2021-12-06 23:21:07 -05:00
Nobuyoshi Nakada ca7de49aa5 [ruby/ostruct] [DOC] Fix code markups [ci skip]
Backquotes are not special characters in RDoc.

https://github.com/ruby/ostruct/commit/a901df26b9
2021-11-28 17:10:48 +09:00
Hiroshi SHIBATA 422b057d65 [ruby/ostruct] Bump up ostruct version to 0.5.0
https://github.com/ruby/ostruct/commit/c535a406f8
2021-10-21 20:54:33 +09:00
Nobuyoshi Nakada 8bdaaeb99a [ruby/ostruct] Strip trailing spaces
https://github.com/ruby/ostruct/commit/df1109c18f
2021-09-28 20:01:35 +09:00
rm155 cefa029573 [ruby/ostruct] Allow properties to be accessed even when the object is moved to another Ractor (https://github.com/ruby/ostruct/pull/29)
https://github.com/ruby/ostruct/commit/d85639f2f5
2021-09-28 17:30:06 +09:00
Nobuyoshi Nakada a27c274f04
[DOC] Fix broken links [ci skip]
* As the "doc/" prefix is specified by the `--page-dir` option,
  remove from the rdoc references.
* Refer to the original .rdoc instead of the converted .html.
2021-09-15 14:16:14 +09:00
Marc-Andre Lafortune f0818982e9 [ruby/ostruct] v0.4.0
https://github.com/ruby/ostruct/commit/8534f69e4e
2021-06-15 12:04:05 +09:00
Marc-Andre Lafortune 52369fc545 [lib/ostruct] Allow overriding of `block_given?` 2021-06-14 12:28:53 -04:00
Nobuyoshi Nakada 5dde13e5ce [ruby/ostruct] bump up
https://github.com/ruby/ostruct/commit/bb253be3e9
2021-06-14 23:31:49 +09:00
jfrazx 931ea7cfbe
Add fallback block to `OpenStruct#delete_field` (#1409) 2021-06-14 09:53:20 -04:00
Marc-Andre Lafortune 7f1323c3bd
[ruby/ostruct] Add compatibility for to_h with block in Ruby 2.5
https://github.com/ruby/ostruct/commit/da45de5068
2021-04-28 17:48:05 +09:00
Marc-Andre Lafortune 37b445eaeb [ruby/ostruct] Compatibility with Ruby 2.5
https://github.com/ruby/ostruct/commit/ecd9fafdf8
2021-04-28 17:33:59 +09:00
Marc-Andre Lafortune 30a35420e6 [ruby/ostruct] Bump version 2021-01-13 01:09:29 -05:00
Marc-Andre Lafortune f48edc28dd Fix method protection for modules in the ancestry chain.
[Fixes ruby/ostruct#23]
2021-01-12 23:29:39 -05:00
Marc-Andre Lafortune a0a6293e78 [ruby/ostruct] Bump version 2021-01-05 18:35:56 -05:00
Adam Hess e13f41e02d
[ruby/ostruct] Allow ostruct to return a value on super (#4028)
This fixes cases where you can super in something that inherits from OpenStruct

Co-authored-by: John Hawthorn <john@hawthorn.email>
2021-01-05 18:34:45 -05:00
Marc-Andre Lafortune 2aa9a50dcc [ruby/ostruct] Update version 2020-11-04 17:52:03 -05:00
Marc-Andre Lafortune 015b023820 [ruby/ostruct] Restore `ostruct` doc 2020-11-04 17:52:03 -05:00
Marc-Andre Lafortune 6f24be8565 Revert "Make `marshal_load` public"
This reverts commit ee7cc6ac35.

I'm not sure I agree with the spec, but I just tweaked it.
2020-11-04 17:52:03 -05:00
Nobuyoshi Nakada 3198e7abd7
Separate `send` into `public_send` and `__send__` 2020-10-27 16:12:45 +09:00
Aaron Patterson ee7cc6ac35
Make `marshal_load` public
Ruby specs expected this method to be public
2020-10-06 15:13:49 -07:00
Marc-Andre Lafortune 1486785a57 [lib/ostruct] Fix Marshal loading 2020-10-06 17:11:08 -04:00
Marc-Andre Lafortune bb2ba72c3b [ruby/ostruct] Tweak doc 2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune 152ba86b6b [ruby/ostruct] Remove unused condition 2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune b36a45c05c [ruby/ostruct] Improved YAML serialization.
Patch adapted from Pietro Monteiro [Fixes bug#8382]
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune 0977040133 [ruby/ostruct] Add test that frozen OpenStructs are Ractor-shareable 2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune 083fa6e5d2 [ruby/ostruct] Protect subclass' methods and our bang methods.
Internally, use only bang methods
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune df4d08c44a [ruby/ostruct] Avoid calling initialize 2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune 60f5d38482 [ruby/ostruct] Fix dup/clone 2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune 125605abd9 [ruby/ostruct] method_missing is private 2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune 606c009ce2 [ruby/ostruct] Avoid self calling our public methods.
Found because `json` has a bad example in its test suite.
This implementation still offers better encapsulation.
2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune 67e5f7a9e5 [ruby/ostruct] Reinstate recent changes
This reverts commit 28e60b0045.
2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune 28e60b0045 [ruby/ostruct] Revert recent changes
This reverts commit e026e186f4..12a2e32d43.
2020-09-14 13:29:54 -04:00
Marc-Andre Lafortune 12a2e32d43 [ruby/ostruct] Add access to public instance methods in case they are overriden 2020-09-14 12:46:51 -04:00
Marc-Andre Lafortune 12a13eef49 [ruby/ostruct] Tweak doc 2020-09-14 12:46:49 -04:00
Marc-Andre Lafortune 8eefa8f373 [ruby/ostruct] Allow overriding public methods
[Fixes https://bugs.ruby-lang.org/issues/15409]
2020-09-14 12:46:47 -04:00
Marc-Andre Lafortune ebb8de7302 [ruby/ostruct] Refactor handling of frozen OpenStruct. Simplify `new_ostruct_member!` 2020-09-14 12:46:45 -04:00
Marc-Andre Lafortune e026e186f4 [ruby/ostruct] Revert "ostruct.rb: deferred accessors"
This reverts commits:
dc38e99813
22c082fcfd
b499e0f9ff
58e5876646

Add test for overriden private methods

[Fixes https://bugs.ruby-lang.org/issues/12136]
2020-09-14 12:46:27 -04:00
Marc-Andre Lafortune fbaab562d9 lib/ostruct.rb: Revert "To use RuntimeError instead of FrozenError for old ruby versions."
This reverts commit 4cd1fc8b3559353069860eee90b1b5bade013917.
2020-09-04 01:23:14 -04:00
Burdette Lamar c84ccf1a07
Fix links to Dig Methods document (#3421)
* Fix links to Dig Methods document

* Fix links to Dig Methods document
2020-08-14 18:55:04 -05:00
Burdette Lamar 22fd617aa5
Adding doc/dig_methods.rdoc and links to it (#3416)
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.
2020-08-13 13:16:27 -05:00