From: "matheusrich (Matheus Richard)" Date: 2021-12-15T15:43:28+00:00 Subject: [ruby-core:106693] [Ruby master Misc#18404] 3.1 documentation problems tracking ticket Issue #18404 has been updated by matheusrich (Matheus Richard). Gotcha! Thanks. I couldn't make it show up on the docs, though. The docs are definitely there (struct.c:288) ```c /* * call-seq: * StructClass.keyword_init? -> true or false * * Returns true if the class was initialized with +keyword_init: true+. * Otherwise returns false. * * Examples: * Foo = Struct.new(:a) * Foo.keyword_init? # => nil * Bar = Struct.new(:a, keyword_init: true) * Bar.keyword_init? # => true * Baz = Struct.new(:a, keyword_init: false) * Baz.keyword_init? # => false */ #define rb_struct_s_keyword_init_p rb_struct_s_keyword_init ``` I'm not super familiar with C, so I may missing something. I wonder if the docs are not present because this method is defined on the singleton class, not on the Struct class itself. If that's the case, maybe we can just add a reference to it on the Keyword Argument section. ---------------------------------------- Misc #18404: 3.1 documentation problems tracking ticket https://bugs.ruby-lang.org/issues/18404#change-95375 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal ---------------------------------------- So far, comparing the NEWS.md to actual documentation at https://docs.ruby-lang.org/en/master/, I identified the following problems: * Hash/keyword argument value omission���completely undocumented. PR: https://github.com/ruby/ruby/pull/5244 * New [Refinement](https://docs.ruby-lang.org/en/master/Refinement.html) class has no docs whatsoever. PR: https://github.com/ruby/ruby/pull/5272 * ~~[Queue::new](https://docs.ruby-lang.org/en/master/Thread/Queue.html#method-c-new) should be rewritten (bad rendering for example, non-informative parameter name). PR: https://github.com/ruby/ruby/pull/5273~~ Merged * [Struct](https://docs.ruby-lang.org/en/master/Struct.html): `#keyword_init?` isn't mentioned anywhere * `Thread::Backtrace.limit` isn't mentioned anywhere (`Thread::Backtrace` doesn't even have its own page, only [Thread::Backtrace::Location](https://docs.ruby-lang.org/en/master/Thread/Backtrace/Location.html) has) * [GC](https://docs.ruby-lang.org/en/master/GC.html): `::measure_total_time`, `::measure_total_time=`, `::total_time` isn't mentioned anywhere: * [Fiber::SchedulerInterface ](https://docs.ruby-lang.org/en/master/Fiber/SchedulerInterface.html) ��� no docs for new methods supported: `address_resolve`, `timeout_after`, `io_read`, `io_write` * [IO::Buffer](https://docs.ruby-lang.org/en/master/IO/Buffer.html) no docs Small glitches in new docs: * ~~[Process._fork](https://docs.ruby-lang.org/en/master/Process.html#method-c-_fork) formatting of `tt`. PR: https://github.com/ruby/ruby/pull/5270~~ Merged * ~~[Integer#try_convert](https://docs.ruby-lang.org/en/master/Integer.html#method-c-try_convert): small typo: "Returns nil if object does not respond to **:to_ary**" (should be `:to_int`).~~ Fixed already. I'll try to address as much as I'll be able myself, but if some of the feature authors/other volunteers are willing to participate, I'll be glad :) The ticket might be expanded if I'll notice something else. -- https://bugs.ruby-lang.org/ Unsubscribe: