Skip to content

Commit

Permalink
Ditch code scheduled for removal after 0.19
Browse files Browse the repository at this point in the history
Sija authored and Ary Borenszweig committed Nov 28, 2016

Verified

This commit was signed with the committer’s verified signature.
headius Charles Oliver Nutter
1 parent eff31e5 commit 0f2933a
Showing 4 changed files with 4 additions and 14 deletions.
6 changes: 2 additions & 4 deletions src/compiler/crystal/semantic/call.cr
Original file line number Diff line number Diff line change
@@ -457,10 +457,8 @@ class Crystal::Call
def named_tuple_indexer_helper(args, arg_types, owner, instance_type, nilable)
arg = args.first

case arg # TODO: use || after 0.19
when SymbolLiteral
name = arg.value
when StringLiteral
case arg
when SymbolLiteral, StringLiteral
name = arg.value
end

1 change: 0 additions & 1 deletion src/process.cr
Original file line number Diff line number Diff line change
@@ -242,7 +242,6 @@ class Process
)
rescue ex
ex.inspect_with_backtrace STDERR
LibC._exit 127 # TODO: remove after 0.19
ensure
LibC._exit 127
end
3 changes: 0 additions & 3 deletions src/secure_random.cr
Original file line number Diff line number Diff line change
@@ -101,9 +101,6 @@ module SecureRandom
urandom.sync = true # don't buffer bytes
end

# TODO: remove after 0.19.0 is released
@@getrandom_available : Bool?

{% if flag?(:linux) %}
@@getrandom_available = false

8 changes: 2 additions & 6 deletions src/string/formatter.cr
Original file line number Diff line number Diff line change
@@ -43,9 +43,7 @@ struct String::Formatter(A)
private def consume_substitution
key = consume_substitution_key '}'
arg = current_arg
if arg.is_a?(Hash)
@io << arg[key]
elsif arg.is_a?(NamedTuple) # TODO: join with || after 0.19
if arg.is_a?(Hash) || arg.is_a?(NamedTuple)
@io << arg[key]
else
raise ArgumentError.new "one hash or named tuple required"
@@ -56,9 +54,7 @@ struct String::Formatter(A)
key = consume_substitution_key '>'
next_char
arg = current_arg
if arg.is_a?(Hash)
target_arg = arg[key]
elsif arg.is_a?(NamedTuple) # TODO: join with || after 0.19
if arg.is_a?(Hash) || arg.is_a?(NamedTuple)
target_arg = arg[key]
else
raise ArgumentError.new "one hash or named tuple required"

0 comments on commit 0f2933a

Please sign in to comment.