Thank you for reporting the issue. I am attaching an updated patch with a test code.
The original patch raises an exception when rendering a specific version of a Wiki page. The attached patch includes the fix for it.
ActionView::Template::Error (undefined method `versions' for an instance of WikiContentVersion):
85: <p class="wiki-update-info">
86: <% if User.current.allowed_to?(:view_wiki_edits, @project) %>
87: <%= wiki_content_update_info(@content) %>
88: · <%= link_to l(:label_x_revisions, :count => @content.versions.all.size), {:action => 'history', :id => @page.title} %>
89: <% end %>
90: <% if @page.protected? %>
91: <span class="badge badge-status-locked"><%= l('status_locked') %></span>
app/views/wiki/show.html.erb:88