Skip to content

Commit

Permalink
Merge a9c2a45 into 45b1288
Browse files Browse the repository at this point in the history
  • Loading branch information
nbeyer committed Oct 1, 2019
2 parents 45b1288 + a9c2a45 commit c13262b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#### Fixes

* Your contribution here.
* [#1909](https://github.com/ruby-grape/grape/pull/1909): Use defined? to correct not initialized warnings
* [#1893](https://github.com/ruby-grape/grape/pull/1893): Allows `Grape::API` to behave like a Rack::app in some instances where it was misbehaving - [@myxoh](https://github.com/myxoh).
* [#1898](https://github.com/ruby-grape/grape/pull/1898): Refactor `ValidatorFactory` to improve memory allocation - [@Bhacaz](https://github.com/Bhacaz).
* [#1900](https://github.com/ruby-grape/grape/pull/1900): Define boolean for `Grape::Api::Instance` - [@Bhacaz](https://github.com/Bhacaz).
Expand Down
6 changes: 3 additions & 3 deletions lib/grape/dsl/routing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def version(*args, &block)
end
end

@versions.last unless @versions.nil?
@versions.last if defined?(@versions) && @versions
end

# Define a root URL prefix for your entire API.
Expand Down Expand Up @@ -163,8 +163,8 @@ def route(methods, paths = ['/'], route_options = {}, &block)
def namespace(space = nil, options = {}, &block)
if space || block_given?
within_namespace do
previous_namespace_description = @namespace_description
@namespace_description = (@namespace_description || {}).deep_merge(namespace_setting(:description) || {})
previous_namespace_description = defined?(@namespace_description) ? @namespace_description : nil
@namespace_description = (previous_namespace_description || {}).deep_merge(namespace_setting(:description) || {})
nest(block) do
if space
namespace_stackable(:namespace, Namespace.new(space, options))
Expand Down

0 comments on commit c13262b

Please sign in to comment.