<commit_before>## edge

*   Fix parsing of escapes in single-strings ('foo\n'). Only ' and \
    characters now get escaped in single quoted strings. Also, more escape
    sequences in double-quoted strings are now supported: `\a`, `\v`, `\f`,
    `\e`, `\s`, octal (`\314`), hex (`\xff`) and unicode (`\u1234`).

*   Sourcemaps revamp. Lexer now tracks column and line info for ever token to
    produce much more accurate sourcemaps. All method calls are now located on
    the correct source line, and multi-line xstrings are now split to generate
    a map line-to-line for long inline javascript parts.

*   Merged sprockets support from `opal-sprockets` directly into Opal. For the
    next release, the exernal `opal-sprockets` gem is no longer needed. This
    commit adds `Opal::Processor`, `Opal::Server` and `Opal::Environment`.

*   Introduce pre-processed if directives to hide code from Opal. Two special
    constant checks now take place in the compiler. Either `RUBY_ENGINE` or
    `RUBY_PLATFORM` when `== "opal"`. Both if and unless statements can pick
    up these logic checks:

        if RUBY_ENGINE == "opal"
          # this code compiles
        else
          # this code never compiles
        end

    Unless:

        unless RUBY_ENGINE == "opal"
          # this code never compiles
        end

    This is particularly useful for avoiding `require()` statements being
    picked up, which are included at compile time.

*   Add special `debugger` method to compiler. Compiles down to javascript
    `debugger` keyword to start in-browser debug console.

*   Add missing string escapes to `read_escape` in lexer. Now most ruby escape
    sequences are properly detected and handled in string parsing.

*   Disable escapes inside x-strings. This means no more double escaping all
    characters in x-strings and backticks. (`\n` => `\n`).

*   Add `time.rb` to stdlib and moved `Time.parse()` and `Time.iso8601()`
    methods there.

*   `!` is now treated as a unary method call on the object. Opal now parsed
    `!` as a def method name, and implements the method on `BasicObject`,
    `NilClass` and `Boolean`.

*   Fixed bug where true/false as object literals from javascript were not
    correctly being detected as truthy/falsy respectively. This is due to the
    javascript "feature" where `new Boolean(false) !== false`.

*   Moved `native.rb` to stdlib. Native support must now be explicitly required
    into Opal. `Native` is also now a module, instead of a top level class.
    Also added `Native::Object#respond_to?`.

*   Remove all core `#as_json()` methods from `json.rb`. Added them externally
    to `opal-activesupport`.

*   `Kernel#respond_to?` now calls `#respond_to_missing?` for compliance.

*   Fix various `String` methods and add relevant rubyspecs for them. `#chars`,
    `#to_f`, `#clone`, `#split`.

*   Fix `Array` method compliance: `#first`, `#fetch`, `#insert`, `#delete_at`,
    `#last, `#splice`, `.try_convert`.

*   Fix compliance of `Kernel#extend` and ensure it calls `#extended()` hook.

*   Fix bug where sometimes the wrong regexp flags would be generated in the
    output javascript.

*   Support parsing `__END__` constructs in ruby code, inside the lexer. The
    content is gathered up by use of the parser. The special constant `DATA`
    is then available inside the ruby code to read the content.

*   Support single character strings (using ? prefix) with escaped characters.

*   Fix lexer to detect dereferencing on local variables even when whitespace
    is present (`a = 0; a [0]` parses as a deference on a).

*   Fix various `Struct` methods. Fixed `#each` and `#each_pair` to return
    self. Add `Struct.[]` as synonym for `Struct.new`.

*   Implemented some `Enumerable` methods: `#collect_concat`, `#flat_map`,
    `#reject`, `#reverse_each`, `#partition` and `#zip`.

*   Support any Tilt template for `index_path` in `Opal::Server`. All index
    files are now run through `Tilt` (now supports haml etc).

*   Fix code generation of `op_asgn_1` calls (foo[val] += 10).
<commit_msg>Add some recent changes into changelog<commit_after>## edge

*   Fix parsing of escapes in single-strings ('foo\n'). Only ' and \
    characters now get escaped in single quoted strings. Also, more escape
    sequences in double-quoted strings are now supported: `\a`, `\v`, `\f`,
    `\e`, `\s`, octal (`\314`), hex (`\xff`) and unicode (`\u1234`).

*   Sourcemaps revamp. Lexer now tracks column and line info for ever token to
    produce much more accurate sourcemaps. All method calls are now located on
    the correct source line, and multi-line xstrings are now split to generate
    a map line-to-line for long inline javascript parts.

*   Merged sprockets support from `opal-sprockets` directly into Opal. For the
    next release, the exernal `opal-sprockets` gem is no longer needed. This
    commit adds `Opal::Processor`, `Opal::Server` and `Opal::Environment`.

*   Introduce pre-processed if directives to hide code from Opal. Two special
    constant checks now take place in the compiler. Either `RUBY_ENGINE` or
    `RUBY_PLATFORM` when `== "opal"`. Both if and unless statements can pick
    up these logic checks:

        if RUBY_ENGINE == "opal"
          # this code compiles
        else
          # this code never compiles
        end

    Unless:

        unless RUBY_ENGINE == "opal"
          # this code never compiles
        end

    This is particularly useful for avoiding `require()` statements being
    picked up, which are included at compile time.

*   Add special `debugger` method to compiler. Compiles down to javascript
    `debugger` keyword to start in-browser debug console.

*   Add missing string escapes to `read_escape` in lexer. Now most ruby escape
    sequences are properly detected and handled in string parsing.

*   Disable escapes inside x-strings. This means no more double escaping all
    characters in x-strings and backticks. (`\n` => `\n`).

*   Add `time.rb` to stdlib and moved `Time.parse()` and `Time.iso8601()`
    methods there.

*   `!` is now treated as a unary method call on the object. Opal now parsed
    `!` as a def method name, and implements the method on `BasicObject`,
    `NilClass` and `Boolean`.

*   Fixed bug where true/false as object literals from javascript were not
    correctly being detected as truthy/falsy respectively. This is due to the
    javascript "feature" where `new Boolean(false) !== false`.

*   Moved `native.rb` to stdlib. Native support must now be explicitly required
    into Opal. `Native` is also now a module, instead of a top level class.
    Also added `Native::Object#respond_to?`.

*   Remove all core `#as_json()` methods from `json.rb`. Added them externally
    to `opal-activesupport`.

*   `Kernel#respond_to?` now calls `#respond_to_missing?` for compliance.

*   Fix various `String` methods and add relevant rubyspecs for them. `#chars`,
    `#to_f`, `#clone`, `#split`.

*   Fix `Array` method compliance: `#first`, `#fetch`, `#insert`, `#delete_at`,
    `#last, `#splice`, `.try_convert`.

*   Fix compliance of `Kernel#extend` and ensure it calls `#extended()` hook.

*   Fix bug where sometimes the wrong regexp flags would be generated in the
    output javascript.

*   Support parsing `__END__` constructs in ruby code, inside the lexer. The
    content is gathered up by use of the parser. The special constant `DATA`
    is then available inside the ruby code to read the content.

*   Support single character strings (using ? prefix) with escaped characters.

*   Fix lexer to detect dereferencing on local variables even when whitespace
    is present (`a = 0; a [0]` parses as a deference on a).

*   Fix various `Struct` methods. Fixed `#each` and `#each_pair` to return
    self. Add `Struct.[]` as synonym for `Struct.new`.

*   Implemented some `Enumerable` methods: `#collect_concat`, `#flat_map`,
    `#reject`, `#reverse_each`, `#partition` and `#zip`.

*   Support any Tilt template for `index_path` in `Opal::Server`. All index
    files are now run through `Tilt` (now supports haml etc).

*   Fix code generation of `op_asgn_1` calls (foo[val] += 10).

*   Add `base64` to stdlib.

*   Add promises implementation to stdlib.

*   Add `Math` module to corelib.

{'fraction_non_alphanumeric': 0.09646689979500783, 'fraction_numerical': 0.004099843241287833, 'mean_word_length': 3.3629668595476065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5120858', 'n_tokens_mistral': 2520, 'n_tokens_neox': 2390, 'n_words': 1077}