Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default options not used by default #9

Open
bhb opened this issue Jan 27, 2021 · 0 comments
Open

Default options not used by default #9

bhb opened this issue Jan 27, 2021 · 0 comments

Comments

@bhb
Copy link

bhb commented Jan 27, 2021

Version: 2.0.1

I believe that options are not passed to the parser by default i.e. this code

bai2/lib/bai2.rb

Lines 35 to 36 in 9b5d781

@options = DEFAULT_OPTIONS.merge(options)
parse(raw, options)

should potentially look like

 @options = DEFAULT_OPTIONS.merge(options) 
 parse(raw, @options) 

Repro:

  1. Add puts "--- options #{options.inspect}" at the top of Bai2::Parser.parse`
    def parse(data, options)
  2. Run Bai2::BaiFile.new(str)

Expected: Options should be the default set of options
Actual: Options are the empty hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant