lib/github_api/issues/labels.rb in github_api-0.5.3 vs lib/github_api/issues/labels.rb in github_api-0.5.4

- old
+ new

@@ -127,11 +127,11 @@ # = Examples # github = Github.new # github.issues.labels.add 'user-name', 'repo-name', 'issue-id', 'label1', 'label2', ... # def add(user_name, repo_name, issue_id, *args) - params = args.last.is_a?(Hash) ? args.pop : {} + params = args.extract_options! params['data'] = args unless args.empty? _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? _validate_presence_of(issue_id) @@ -172,10 +172,10 @@ # = Examples # github = Github.new # github.issues.labels.replace 'user-name', 'repo-name', 'issue-id', 'label1', 'label2', ... # def replace(user_name, repo_name, issue_id, *args) - params = args.last.is_a?(Hash) ? args.pop : {} + params = args.extract_options! params['data'] = args unless args.empty? _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? _validate_presence_of issue_id