I'm a little unclear on what you mean by "that works", because I'm not sure what behavior you're expecting. Also, can you provide a code sample that is producing your result? Based on what I am seeing, both public and private methods behave the same way for the same docstring on my end:
(Correctly) produces:
Loren
--
---
You received this message because you are subscribed to the Google Groups "YARD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yardoc+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yardoc/43a97cb3-3094-487c-8651-622af44a5823%40googlegroups.com.
The behavior is indeed intentional. The question mark indicates that the field is nullable [Integer, nil] is the right way to specify a nullable type. Using [nil, Integer] will break YARD because it doesn't understand which field is nullable -- arguably it could figure it out but this enables the formatting workaround you described so there is no need to change the behavior.
Loren
--
---
You received this message because you are subscribed to the Google Groups "YARD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yardoc+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yardoc/69e65ef7-e478-4a6d-83db-56374e6474dd%40googlegroups.com.