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

Avoid incorrectly parsing on Ruby 1.8.7 and 1.9.3 #1150

Merged
merged 1 commit into from
Mar 22, 2018

Conversation

sinsoku
Copy link
Contributor

@sinsoku sinsoku commented Mar 22, 2018

The statichtml task occurs an error.

$ rake statichtml:1.9.3
generate database of 1.9.3
refm/api/src/_builtin/ARGF:1: singleton object class not implemented yet
refm/api/src/tk/TkCore__INTERP:1: singleton object class not implemented yet
refm/api/src/webrick/httpproxy/NullReader:2: singleton object class not implemented yet
generate static html of 1.9.3
例: find-minimum モード:6:1 unknown regexp options - lt (BitClust::SyntaxHighlighter::CompileError)
rake aborted!
Failed to generate static html

Because it will fail to parse the document with deeply nested conditions.
And it will generate an incorrect database that contains syntax error code.


Ruby 1.8.7 と 1.9.3 で statichtml タスクがエラーになるので修正しました。

ドキュメント内の条件分岐のネストが深いとパースに失敗してしまい、syntax error のコードを含むDBが作られてしまいます。

エラーを避けるために、条件分岐のネストを浅くしました。

The `statichtml` task occurs an error.

```console
$ rake statichtml:1.9.3
generate database of 1.9.3
refm/api/src/_builtin/ARGF:1: singleton object class not implemented yet
refm/api/src/tk/TkCore__INTERP:1: singleton object class not implemented yet
refm/api/src/webrick/httpproxy/NullReader:2: singleton object class not implemented yet
generate static html of 1.9.3
例: find-minimum モード:6:1 unknown regexp options - lt (BitClust::SyntaxHighlighter::CompileError)
rake aborted!
Failed to generate static html
```

Because it will fail to parse the document with deeply nested conditions.
And it will generate an incorrect database that contains syntax error code.
@sho-h sho-h merged commit 990e34b into rurema:master Mar 22, 2018
@sho-h
Copy link
Member

sho-h commented Mar 22, 2018

ありがとうございますー。2.0.0からなのは以下を閉じてるからのようですので、変化なしという事でマージしました。

#@since 2.0.0
--- bsearch { |x| ... } -> object | nil
...

ただ、エラーが出る原因も見たいところではありますね。それはbitclustの方にIssueを立てようかと思います。

@sho-h
Copy link
Member

sho-h commented Mar 22, 2018

1つ書き忘れました。ただ、2.2.0までのバージョンについてはメンテナンス対象ではないのでbitclustの機能的な問題でなければ特に修正しないかもしれません。

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

Successfully merging this pull request may close these issues.

None yet

2 participants