Skip to content

Commit

Permalink
Use rb_define_private_method for Session methods
Browse files Browse the repository at this point in the history
  • Loading branch information
marshall-lee committed Aug 2, 2022
1 parent 2f1dd51 commit 0ae6377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ext/patron/session_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,11 +966,11 @@ void Init_session_ext() {
rb_define_singleton_method(cSession, "unescape", session_unescape, 1);
rb_define_method(cSession, "unescape", session_unescape, 1);

rb_define_method(cSession, "handle_request", session_handle_request, 1);
rb_define_private_method(cSession, "handle_request", session_handle_request, 1);
rb_define_method(cSession, "reset", session_interrupt, 0);
rb_define_method(cSession, "interrupt", session_interrupt, 0);
rb_define_method(cSession, "add_cookie_file", add_cookie_file, 1);
rb_define_method(cSession, "set_debug_file", set_debug_file, 1);
rb_define_private_method(cSession, "add_cookie_file", add_cookie_file, 1);
rb_define_private_method(cSession, "set_debug_file", set_debug_file, 1);
rb_define_alias(cSession, "urlencode", "escape");
rb_define_alias(cSession, "urldecode", "unescape");

Expand Down
2 changes: 0 additions & 2 deletions lib/patron/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ class Session
# @see low_speed_time
attr_accessor :low_speed_limit

private :handle_request, :add_cookie_file, :set_debug_file

# @return [#call, nil] callable object that will be called with 4 arguments
# during request/response execution - `dltotal`, `dlnow`, `ultotal`, `ulnow`.
# All these arguments are in bytes.
Expand Down

0 comments on commit 0ae6377

Please sign in to comment.