Skip to content
  • Nobuyoshi Nakada's avatar
    768668a4
    [flori/json] Remove unnecessary code · 768668a4
    Nobuyoshi Nakada authored
    In `JSON#generate` and `JSON#fast_generate`:
    
    - When the given `opts` is a `JSON::State` the variable is set to
      `nil`.
    - But it will be never used as the next `if` blocks will not be
      executed.
    - `JSON::State#configure` does the conversion to `Hash`, the
      conversions in the `if` block are just duplication.
    - `JSON::State.new` does the same thing with `configure` when an
      argument is given.
    
    https://github.com/flori/json/commit/5d9ab87f8e
    768668a4
    [flori/json] Remove unnecessary code
    Nobuyoshi Nakada authored
    In `JSON#generate` and `JSON#fast_generate`:
    
    - When the given `opts` is a `JSON::State` the variable is set to
      `nil`.
    - But it will be never used as the next `if` blocks will not be
      executed.
    - `JSON::State#configure` does the conversion to `Hash`, the
      conversions in the `if` block are just duplication.
    - `JSON::State.new` does the same thing with `configure` when an
      argument is given.
    
    https://github.com/flori/json/commit/5d9ab87f8e
Loading