When setting the <value> of a gamerule, using "/gamerule <rule> <value>", <value> can be set to literally anything. To test this, set any gamerule to any value you want, then type "/gamerule <rule>" to check the value of the rule. It should read "<rule> = <value>".
For example, I typed "/gamerule keepInventory toggle", knowing full well this wasn't going to do anything. Except that when I typed "/gamerule keepInventory" it told me that "keepInventory = toggle". I don't think that's supposed to happen.
Duplicate of MC-2911 - If you have not, please use the search function in the future, to see if your bug has already been submitted. If you could not find the original report, please comment with the keywords you searched for.