File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ this information to the user:
135135
136136``` ruby
137137last_response = client.last_response
138- number_of_pages = last_response.rels[:last ].href.match(/page=(\d +) $/ )[1 ]
138+ number_of_pages = last_response.rels[:last ].href.match(/page=(\d +) .* $/ )[1 ]
139139
140140puts " There are #{ total_count } results, on #{ number_of_pages } pages!"
141141```
@@ -171,7 +171,7 @@ results = client.search_code('addClass user:mozilla', :per_page => 100)
171171total_count = results.total_count
172172
173173last_response = client.last_response
174- number_of_pages = last_response.rels[:last ].href.match(/page=(\d +) $/ )[1 ]
174+ number_of_pages = last_response.rels[:last ].href.match(/page=(\d +) .* $/ )[1 ]
175175
176176puts last_response.rels[:last ].href
177177puts " There are #{ total_count } results, on #{ number_of_pages } pages!"
@@ -208,7 +208,7 @@ results = client.search_code('addClass user:mozilla')
208208total_count = results.total_count
209209
210210last_response = client.last_response
211- number_of_pages = last_response.rels[:last ].href.match(/page=(\d +) $/ )[1 ]
211+ number_of_pages = last_response.rels[:last ].href.match(/page=(\d +) .* $/ )[1 ]
212212
213213puts last_response.rels[:last ].href
214214puts " There are #{ total_count } results, on #{ number_of_pages } pages!"
You can’t perform that action at this time.
0 commit comments