# frozen_string_literal: true # sample-syntax-error.rb: a Ruby file with a DELIBERATE syntax error. # Free sample from 99helpers.com/file-types/rb # The `def` below has no matching `end`. Use this file to check how an # editor, linter or upload pipeline reports errors: # ruby -c sample-syntax-error.rb # reports a syntax error near the end of the file ("unexpected end-of-input", # with wording that depends on your Ruby version) and exits with status 1. def greet(name) if name.empty? puts "Hello, stranger" else puts "Hello, #{name}" end greet("Ada")