Sha256: e81b4d496bd1b4aed95ee2083fce37e1d0e628b550c3383943ef846f40b73638

Contents?: true

Size: 636 Bytes

Versions: 12

Compression:

Stored size: 636 Bytes

Contents

As of Ruby 1.9.3, it is impossible to dynamically generate a Symbol
through interpolation without generating garbage. Theoretically, Ruby
should be able to take care of this by building up the String in C and
interning the C String.

Because of this, we avoid generating dynamic Symbols at runtime. For
example, instead of generating the instrumentation event dynamically, we
have a constant with a Hash of events:

```ruby
INSTRUMENT = {
  serialize: :"serialize.serializer",
  associations: :"associations.serializer"
}
```

If Ruby ever fixes this issue and avoids generating garbage with dynamic
symbols, this code can be removed.

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gpi-active_model_serializers-0.8.5 cruft.md
gpi-active_model_serializers-0.8.5.alpha1 cruft.md
gpi-active_model_serializers-0.8.4 cruft.md
gpi-active_model_serializers-0.8.4.alpha5 cruft.md
gpi-active_model_serializers-0.8.4.alpha4 cruft.md
gpi-active_model_serializers-0.8.4.alpha3 cruft.md
gpi-active_model_serializers-0.8.4.alpha2 cruft.md
gpi-active_model_serializers-0.8.4.alpha1 cruft.md
gpi-active_model_serializers-0.8.3.rc1 cruft.md
gpi-active_model_serializers-0.8.3.alpha2 cruft.md
gpi-active_model_serializers-0.8.3.alpha1 cruft.md
gpi-active_model_serializers-0.8.2 cruft.md