Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cookie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ impl SameSite {
}

/// SameSite attribute as a lowercase Ruby symbol.
pub fn to_sym(&self) -> magnus::Symbol {
let name = match self {
pub fn to_sym(ruby: &Ruby, rb_self: &Self) -> magnus::Symbol {
let name = match *rb_self {
SameSite::Strict => "strict",
SameSite::Lax => "lax",
SameSite::None => "none",
};
ruby!().to_symbol(name)
ruby.to_symbol(name)
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/emulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ impl Platform {
self.into_ffi().inspect()
}

pub fn to_sym(&self) -> magnus::Symbol {
let name = match self {
pub fn to_sym(ruby: &Ruby, rb_self: &Self) -> magnus::Symbol {
let name = match *rb_self {
Platform::Windows => "windows",
Platform::MacOS => "macos",
Platform::Linux => "linux",
Platform::Android => "android",
Platform::IOS => "ios",
};
ruby!().to_symbol(name)
ruby.to_symbol(name)
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ impl Method {

/// HTTP method as a lowercase Ruby symbol.
#[inline]
pub fn to_sym(&self) -> magnus::Symbol {
let name = match self {
pub fn to_sym(ruby: &Ruby, rb_self: &Self) -> magnus::Symbol {
let name = match *rb_self {
Method::GET => "get",
Method::HEAD => "head",
Method::POST => "post",
Expand All @@ -57,7 +57,7 @@ impl Method {
Method::TRACE => "trace",
Method::PATCH => "patch",
};
ruby!().to_symbol(name)
ruby.to_symbol(name)
}
}

Expand Down