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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#### Fixed

- ...
- [#872](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/872) Use native String#start_with

#### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def exec_explain(queries)
# which uses sp_executesql to just the first argument, then unquote it. Likewise our
# `sp_executesql` method should substitude the @n args with the quoted values.
def unprepare_sqlserver_statement(sql, binds)
return sql unless sql.starts_with?(SQLSERVER_STATEMENT_PREFIX)
return sql unless sql.start_with?(SQLSERVER_STATEMENT_PREFIX)

executesql = sql.from(SQLSERVER_STATEMENT_PREFIX.length)
executesql = executesql.match(SQLSERVER_STATEMENT_REGEXP).to_a[1]
Expand Down
2 changes: 1 addition & 1 deletion lib/active_record/connection_adapters/sqlserver/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def parse_raw_name
@schema = @parts.first
end
rest = scanner.rest
rest = rest.starts_with?(".") ? rest[1..-1] : rest[0..-1]
rest = rest.start_with?(".") ? rest[1..-1] : rest[0..-1]
@object = unquote(rest)
@parts << @object
end
Expand Down